summaryrefslogtreecommitdiff
path: root/Containerfile
blob: 45b52a950adbf5e9528e14274f47b253b1edd91a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM fedora:42

# Install Node.js and npm
RUN dnf install -y nodejs npm && \
    dnf clean all

# Create app directory
WORKDIR /app

# Copy package files and install production dependencies only
COPY frontend/package*.json ./
RUN npm ci --only=production && \
    npm cache clean --force

# Copy the pre-built Next.js application
COPY frontend/.next ./.next
COPY frontend/public ./public
COPY frontend/next.config.ts ./
COPY frontend/package.json ./


# Copy the built fctdrive binary to PATH
COPY target/release/fctdrive /usr/local/bin/fctdrive
RUN chmod +x /usr/local/bin/fctdrive

# Expose port
EXPOSE 3000

# Set environment variables
ENV NODE_ENV=production
ENV HOSTNAME=0.0.0.0

# Start the Next.js server
CMD ["npm", "start"]