Spaces:
Sleeping
Sleeping
File size: 449 Bytes
7ff860b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # Stage 1: Build
FROM node:20-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# Stage 2: Serve
FROM nginx:stable-alpine
# Copy files from build stage to Nginx folder
COPY --from=build /app/dist /usr/share/nginx/html
# FORCE Nginx to listen on Port 7860 (HF Requirement)
RUN sed -i 's/listen 80;/listen 7860;/' /etc/nginx/conf.d/default.conf
EXPOSE 7860
CMD ["nginx", "-g", "daemon off;"]
|