File size: 681 Bytes
abc7a9e
8239d81
7905940
8239d81
abc7a9e
a27839e
abc7a9e
 
 
a27839e
abc7a9e
 
a27839e
abc7a9e
8239d81
 
abc7a9e
2b19ed8
 
 
 
a27839e
abc7a9e
a27839e
 
2b19ed8
 
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
# 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"]