about summary refs log tree commit diff stats
path: root/Dockerfile
diff options
context:
space:
mode:
authorAlan Pearce2023-07-02 09:05:52 +0200
committerAlan Pearce2023-07-02 09:05:52 +0200
commitb180e25232ba4fd943c5eb5ff6ca0a1d70ee7e16 (patch)
tree9a93549c7168d3344afd1338a8b714d33c68f911 /Dockerfile
parentb4dc3bd51b45d1343cdf486e4cb54e5e92295534 (diff)
downloadwebsite-b180e25232ba4fd943c5eb5ff6ca0a1d70ee7e16.tar.lz
website-b180e25232ba4fd943c5eb5ff6ca0a1d70ee7e16.tar.zst
website-b180e25232ba4fd943c5eb5ff6ca0a1d70ee7e16.zip
Use fly proxy for TLS termination, using h2c
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile13
1 files changed, 11 insertions, 2 deletions
diff --git a/Dockerfile b/Dockerfile
index bf01304..ca10c88 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,9 +1,18 @@
-FROM docker.io/caddy:2-alpine
+ARG VERSION=2.6
+ARG VARIANT=alpine
+
+FROM docker.io/caddy:${VERSION}-builder-${VARIANT} AS builder
+
+RUN xcaddy build \
+    --with github.com/gamalan/caddy-tlsredis
+
+FROM docker.io/caddy:${VERSION}-${VARIANT}
+
+COPY --from=builder /usr/bin/caddy /usr/bin/caddy
 
 COPY Caddyfile /etc/caddy/
 COPY public /srv
 
 EXPOSE 9091/tcp
-EXPOSE 8080/tcp
 
 ENV SITE_ROOT=/srv