timers/Dockerfile
shept f94c90456f Add Docker setup for Nginx serving built Node app
Introduce a multi-stage Dockerfile to build and serve a Node.js application using Nginx. Define a custom Nginx configuration for optimized static file handling and enable gzip compression.
2025-10-29 21:47:59 +05:00

11 lines
242 B
Docker

FROM node:20-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
FROM nginx:stable
COPY --from=build /app/dist /usr/share/nginx/html
COPY .docker/app/nginx/nginx.conf /etc/nginx/nginx.conf
EXPOSE 80