# Build with selfmade hugo
FROM registry.fk.jochum.dev/jochum/hugo:latest

ARG HUGO_VERSION=unknown
ENV HUGO_VERSION ${HUGO_VERSION}

ARG URL=https://example.com

COPY . /build
WORKDIR /build
RUN /go/bin/hugo -b $URL -v -t persona

# Copy to a caddy container
FROM registry.fk.jochum.dev/docker_hub_cache/library/caddy:alpine

LABEL maintainer="René Jochum <rene@jochum.dev>"

COPY docker/caddy/Caddyfile /etc/caddy/

COPY --from=0 /build/public/ /usr/share/caddy/
