File size: 717 Bytes
86a095e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
01558be
86a095e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# New NAI - Hugging Face Spaces Dockerfile (Node.js/Express)
# Ensures binding to $PORT and 0.0.0.0, no browser auto-open.

FROM node:20-bullseye-slim

ENV NODE_ENV=production \
    HOST=0.0.0.0 \
    AUTO_OPEN_BROWSER=0

WORKDIR /app

# Install production deps first (layer cache friendly)
COPY package.json package-lock.json* ./
RUN npm ci --only=production || npm install --only=production

# Copy the rest of the app
COPY . .

# Optional (uncomment if curl-based healthcheck is used)
# RUN apt-get update && apt-get install -y --no-install-recommends curl && rm -rf /var/lib/apt/lists/*

# Spaces provides $PORT. We just run and listen on host 0.0.0.0.
EXPOSE 7860
CMD ["node", "server.js"]