fix: align caddy route container's site declarator with web's
The non-web container's caddy=DOMAIN label and web's caddy=DOMAIN:80 label declare separate Caddyfile site blocks, so caddy-docker-proxy never merges the route's handle directive into the site that actually serves port 80. fn-caddy-route-labels now mirrors web's letsencrypt + 443 check and emits DOMAIN:80 in the HTTP-only path. The bats T1 also dumps the web container's labels alongside api's so future declarator mismatches are visible in CI logs.
This commit is contained in:
2 files changed
+28
-4
No files matched your search
@@ -42,6 +42,13 @@ teardown() {
|
||||
run /bin/bash -c "docker inspect ${TEST_APP}.api.1 --format '{{json .Config.Labels}}' 2>&1 | jq . 2>/dev/null || docker inspect ${TEST_APP}.api.1 --format '{{json .Config.Labels}}' 2>&1"
|
||||
echo "api labels: $output"
|
||||
|
||||
# Also dump the web container's labels so we can compare site declarators
|
||||
# between web and api - caddy treats DOMAIN and DOMAIN:80 as separate
|
||||
# sites, and a mismatch keeps caddy-docker-proxy from merging the two
|
||||
# containers' directives into a single site block.
|
||||
run /bin/bash -c "docker inspect ${TEST_APP}.web.1 --format '{{json .Config.Labels}}' 2>&1 | jq . 2>/dev/null || docker inspect ${TEST_APP}.web.1 --format '{{json .Config.Labels}}' 2>&1"
|
||||
echo "web labels: $output"
|
||||
|
||||
# Give the daemon a moment to read the new labels.
|
||||
sleep 5
|
||||
|
||||
|
||||
Reference in new issue
Block a user