According to the hugo documentation, the Dockerfile was reworked, and the structure of the docker container now follows the pattern of a hugo builder image and an nginx image that actually runs the static site.
FROM hugomods/hugo:exts as builder
ARG HUGO_BASEURL
ENV HUGO_BASEURL=${HUGO_BASEURL}
ARG HUGO_ENV
ENV HUGO_ENV=${HUGO_ENV}
COPY . /src
RUN hugo --minify
FROM hugomods/hugo:nginx
COPY --from=builder /src/public /site
Build with:
docker build -t <tag> --build-arg HUGO_BASEURL="https://wicknet.dev"
This is cleaner than using hugo itself to serve the files as was done in the quick and dirty first draft.
Following this the port mappings on the pods were updated, and the site is back after a brief interruption.
Up next, the structure of the kubernetes deployment will be changed, adding certmanager, and an nginx ingress to the to terminate TLS on the backend, instead of at the VPS edge node running wireguard. Then, the VPS will simply tcp proxy web traffic to the appropriate ip on the cluster, where TLS will be terminated and traffic will be routed to the appropriate pod.