File size: 549 Bytes
5d33320
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 official Node.js image
FROM node:18-alpine

# Set working directory
WORKDIR /app

# Copy package files first (for better caching)
COPY package.json package-lock.json* ./

# Install dependencies (clean & predictable)
RUN npm ci --force

# Copy the rest of the application
COPY . .

# Build the application
RUN npm run build

# Hugging Face Spaces uses PORT env variable
ENV PORT=7860

# Expose the port
EXPOSE 7860

# Start the preview server
CMD ["npm", "run", "preview", "--", "--port", "7860", "--host", "0.0.0.0"]