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"]