add Dockerfile and Caddyfile for deployment container builds

This commit is contained in:
Drew Bowering 2025-05-09 14:19:26 -06:00
parent 1e6a3d2596
commit dac497d685
Signed by: drew
GPG Key ID: DC9462335BDDAC6B
2 changed files with 23 additions and 0 deletions

9
Caddyfile Normal file
View File

@ -0,0 +1,9 @@
{
default_sni web
}
localhost {
tls /tls/tls.crt /tls/tls.key
root * /srv
file_server
}

14
Dockerfile Normal file
View File

@ -0,0 +1,14 @@
# 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