# Stage 1: Build Node FROM node:lts-alpine as build-stage WORKDIR /app COPY package*.json ./ RUN npm install COPY . . RUN npm run build # Stage 2: Nginx Serve FROM nginx:stable-alpine as production-stage COPY nginx.conf /etc/nginx/nginx.conf COPY --from=build-stage /app/dist /app EXPOSE 80 CMD ["nginx", "-g", "daemon off;"]