Make auto-TLS work (somewhat jankily)

This commit is contained in:
3wc 2023-08-20 16:32:17 +02:00
parent c36f5498c5
commit 0ae2a45f78
3 changed files with 16 additions and 0 deletions

1
abra.sh Normal file
View File

@ -0,0 +1 @@
export CADDY_TLS_ASK_CONF_VERSION=v1

View File

@ -17,6 +17,7 @@ services:
deploy:
labels:
- "caddy.email=${LE_EMAIL}"
- "caddy.on_demand_tls.ask=http://localhost:9876"
- "traefik.enable=true"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=8008"
- "traefik.http.routers.${STACK_NAME}.rule="
@ -30,3 +31,10 @@ networks:
volumes:
caddy_data:
configs:
caddy_tls_ask:
name: ${STACK_NAME}_caddy_tls_ask_${CADDY_TLS_ASK_CONF_VERSION}
file: ./tls-ask.caddyfile
labels:
caddy:

7
tls-ask.caddyfile Normal file
View File

@ -0,0 +1,7 @@
http://localhost:9876 {
log {
output stdout
}
respond 200
}