# Build the static site, then serve it with nginx. Two stages, so the image that # runs carries no toolchain — about 50 MB instead of about 400. FROM node:20-bookworm-slim AS build WORKDIR /app COPY package.json package-lock.json* ./ RUN npm ci --no-audit --no-fund || npm install --no-audit --no-fund COPY . . RUN npm run build FROM nginx:alpine COPY --from=build /app/dist /usr/share/nginx/html COPY nginx.conf /etc/nginx/conf.d/default.conf EXPOSE 80