# ── build the static site with Hugo (extended) ───────────────────────────
# pin a version if you want reproducible builds, e.g. hugomods/hugo:exts-0.163.3
FROM hugomods/hugo:exts AS build
WORKDIR /src
COPY . .
RUN hugo --gc --minify

# ── serve the static output with nginx ────────────────────────────────────
FROM nginx:alpine
COPY --from=build /src/public /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
