FrontPilot / Dockerfile
rocky1410's picture
feat(api): move Gemini API calls to backend server
2b19ed8
raw
history blame contribute delete
681 Bytes
# Use a specific Node.js version for consistency
FROM node:20-alpine
# Set the working directory inside the container
WORKDIR /app
# Copy package files and install dependencies
COPY package*.json ./
RUN npm install
# Copy the rest of the application source code
COPY . .
# Build the application
RUN npm run build
# Expect GEMINI_API_KEY to be provided at runtime by Hugging Face Spaces (Settings -> Secrets)
# Install only production dependencies needed to run the server
RUN npm install --production express
# Expose the port that Hugging Face Spaces uses by default
EXPOSE 7860
# Start Node server that serves static files and proxies API calls
CMD ["node", "server.js"]