# Multi-stage: build the static site with Hugo, serve it with nginx.
# Build context is site/ only — legal pages are pre-generated (build-legal.sh)
# and committed, and screenshots are copied in by collect_screenshots.sh, so no
# other part of the repo is needed at image-build time.
FROM hugomods/hugo:exts-0.140.2 AS build
WORKDIR /src
COPY . .
RUN hugo --minify --gc

FROM nginx:alpine
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /src/public /usr/share/nginx/html
EXPOSE 80
