summaryrefslogtreecommitdiff
path: root/Containerfile
diff options
context:
space:
mode:
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"]