# Package versions
ARG HUGO_VERSION="v0.147.1"
ARG CADDY_VERSION="2.10.0"

# Stage 1: Build
FROM ghcr.io/gohugoio/hugo:${HUGO_VERSION} AS builder
WORKDIR /project
COPY . .
RUN hugo build

# Stage 2: Package
FROM docker.io/caddy:${CADDY_VERSION}
COPY Caddyfile /etc/caddy/Caddyfile
COPY --from=builder /project/public /srv
