FROM node:20-slim AS build WORKDIR /app COPY package*.json ./ RUN npm install COPY . . RUN npm run build FROM nginx:alpine COPY --from=build /app/dist /usr/share/nginx/html EXPOSE 7860 CMD ["nginx", "-g", "daemon off;", "-c", "/etc/nginx/nginx.conf"] COPY <<'EOF' /etc/nginx/nginx.conf worker_processes auto; events { worker_connections 1024; } http { include /etc/nginx/mime.types; server { listen 7860; root /usr/share/nginx/html; index index.html; location / { try_files $uri $uri/ /index.html; } } } EOF