File size: 555 Bytes
8638b73
 
95ce595
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Node.js 20 based on Debian Bullseye (more stable DNS than slim/alpine)
FROM node:20-bullseye

# Set environment to production
ENV NODE_ENV=production

# Set working directory
WORKDIR /app

# Copy package.json and package-lock.json
COPY package*.json ./

# Install dependencies --omit=dev (production only)
RUN npm install --omit=dev

# Copy the rest of the application code
COPY . .

# Hugging Face Spaces expects port 7860
EXPOSE 7860

# Default environment port if not provided
ENV PORT=7860

# Command to run the application
CMD ["npm", "start"]