add Dockerfile and Caddyfile for deployment container builds
This commit is contained in:
parent
1e6a3d2596
commit
dac497d685
9
Caddyfile
Normal file
9
Caddyfile
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
default_sni web
|
||||||
|
}
|
||||||
|
|
||||||
|
localhost {
|
||||||
|
tls /tls/tls.crt /tls/tls.key
|
||||||
|
root * /srv
|
||||||
|
file_server
|
||||||
|
}
|
14
Dockerfile
Normal file
14
Dockerfile
Normal 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
|
Loading…
x
Reference in New Issue
Block a user