# Build stage FROM node:20-alpine AS builder WORKDIR /app # Install dependencies COPY package*.json ./ RUN npm install # Copy source code and build COPY . . RUN npm run build # Production stage FROM nginx:alpine # Copy built assets to Nginx COPY --from=builder /app/dist /usr/share/nginx/html EXPOSE 80 CMD ["nginx", "-g", "daemon off;"]