diff options
| author | diogo464 <[email protected]> | 2025-08-14 14:46:47 +0100 |
|---|---|---|
| committer | diogo464 <[email protected]> | 2025-08-14 14:46:47 +0100 |
| commit | 5c32d58bbeb6d0cc836a78a2279bb88ffc8fba63 (patch) | |
| tree | 225395773dc1573fc5148a6795a80f0f22007568 /Containerfile | |
| parent | cf290372162b918c56d2c2e5ba67d7f448ad19ba (diff) | |
add: container configuration files
- .containerignore: exclude unnecessary files from container builds
- CONTAINER.md: documentation for container deployment
- Containerfile: multi-stage build configuration for production
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
Diffstat (limited to 'Containerfile')
| -rw-r--r-- | Containerfile | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..45b52a9 --- /dev/null +++ b/Containerfile | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | FROM fedora:42 | ||
| 2 | |||
| 3 | # Install Node.js and npm | ||
| 4 | RUN dnf install -y nodejs npm && \ | ||
| 5 | dnf clean all | ||
| 6 | |||
| 7 | # Create app directory | ||
| 8 | WORKDIR /app | ||
| 9 | |||
| 10 | # Copy package files and install production dependencies only | ||
| 11 | COPY frontend/package*.json ./ | ||
| 12 | RUN npm ci --only=production && \ | ||
| 13 | npm cache clean --force | ||
| 14 | |||
| 15 | # Copy the pre-built Next.js application | ||
| 16 | COPY frontend/.next ./.next | ||
| 17 | COPY frontend/public ./public | ||
| 18 | COPY frontend/next.config.ts ./ | ||
| 19 | COPY frontend/package.json ./ | ||
| 20 | |||
| 21 | |||
| 22 | # Copy the built fctdrive binary to PATH | ||
| 23 | COPY target/release/fctdrive /usr/local/bin/fctdrive | ||
| 24 | RUN chmod +x /usr/local/bin/fctdrive | ||
| 25 | |||
| 26 | # Expose port | ||
| 27 | EXPOSE 3000 | ||
| 28 | |||
| 29 | # Set environment variables | ||
| 30 | ENV NODE_ENV=production | ||
| 31 | ENV HOSTNAME=0.0.0.0 | ||
| 32 | |||
| 33 | # Start the Next.js server | ||
| 34 | CMD ["npm", "start"] | ||
