# Stage 1: build the static bundle (Node 24 LTS — stable for CI/showcase repos) FROM node:24-alpine AS build WORKDIR /app COPY package*.json ./ RUN npm ci COPY . . RUN npm run build # Stage 2: serve it with nginx (no node runtime in the final image) FROM nginx:alpine COPY nginx.conf /etc/nginx/conf.d/default.conf COPY --from=build /app/dist /usr/share/nginx/html