fix: caddy resolves own app via ${STACK_NAME}_app on shared proxy net

The caddy on-demand-TLS ask + reverse_proxy used bare host "app", which on the
shared external proxy net collides with every other stack aliasing its main
service "app" (docker DNS returns a foreign endpoint -> cert ask refused -> 000
on warm-canonical promote). Use the fully-qualified swarm service name
${STACK_NAME}_app (caddy {$APP_HOST} env) so caddy resolves THIS stack only.
Established coop-cloud pattern (cf. matrix-synapse, mailu, mumble). Bump
CADDYFILE_VERSION v1->v2.
This commit is contained in:
2026-06-18 05:41:29 +00:00
parent f7b6c8dfb8
commit 4987ba91c7
3 changed files with 4 additions and 3 deletions

View File

@ -52,6 +52,7 @@ services:
- internal
environment:
- DOMAIN=${DOMAIN}
- APP_HOST=${STACK_NAME}_app
configs:
- source: caddyfile
target: /etc/caddy/Caddyfile