# ---- Builder: static export -> /app/out ---- FROM node:20-alpine AS builder WORKDIR /app COPY package.json package-lock.json* ./ RUN npm ci COPY . . RUN npm run build # ---- Runner: plain nginx serving the static files ---- FROM nginx:1.27-alpine AS runner COPY docker/nginx.conf /etc/nginx/conf.d/default.conf COPY --from=builder /app/out /usr/share/nginx/html EXPOSE 80