summaryrefslogtreecommitdiff
path: root/Containerfile
diff options
context:
space:
mode:
authordiogo464 <[email protected]>2025-08-14 14:46:47 +0100
committerdiogo464 <[email protected]>2025-08-14 14:46:47 +0100
commit5c32d58bbeb6d0cc836a78a2279bb88ffc8fba63 (patch)
tree225395773dc1573fc5148a6795a80f0f22007568 /Containerfile
parentcf290372162b918c56d2c2e5ba67d7f448ad19ba (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--Containerfile34
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 @@
1FROM fedora:42
2
3# Install Node.js and npm
4RUN dnf install -y nodejs npm && \
5 dnf clean all
6
7# Create app directory
8WORKDIR /app
9
10# Copy package files and install production dependencies only
11COPY frontend/package*.json ./
12RUN npm ci --only=production && \
13 npm cache clean --force
14
15# Copy the pre-built Next.js application
16COPY frontend/.next ./.next
17COPY frontend/public ./public
18COPY frontend/next.config.ts ./
19COPY frontend/package.json ./
20
21
22# Copy the built fctdrive binary to PATH
23COPY target/release/fctdrive /usr/local/bin/fctdrive
24RUN chmod +x /usr/local/bin/fctdrive
25
26# Expose port
27EXPOSE 3000
28
29# Set environment variables
30ENV NODE_ENV=production
31ENV HOSTNAME=0.0.0.0
32
33# Start the Next.js server
34CMD ["npm", "start"]