about summary refs log tree commit diff stats
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile24
1 files changed, 24 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..86b26ea
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,24 @@
+ARG VERSION=2.7.4
+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
+
+ENV SITE_ROOT=/srv
+
+RUN mkdir /etc/caddy/globals/
+RUN touch /etc/caddy/globals/dummy
+RUN ["/usr/bin/caddy", "validate", "--config", "/etc/caddy/Caddyfile"]
+
+COPY redis.Caddyfile /etc/caddy/globals/redis