DistractIQ / Dockerfile
github-actions
Initial clean deploy
7ff860b
Raw
History Blame Contribute Delete
449 Bytes
# 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;"]