caddy: keep admin on for hot reload; deploy.sh reloads after render
The Caddyfile had 'admin off', which disables Caddy's config file watcher. Rendered Caddyfile changes never loaded until the container was recreated, so the double-hash basicauth fix sat on disk unapplied across deploys (2026-08-22). Admin binds to 127.0.0.1:2019 inside the container and the port is unpublished, so nothing outside reaches it. deploy.sh now issues an explicit 'caddy reload' (retry loop) after 'up -d', with the file watcher as backstop.
This commit is contained in:
@@ -155,6 +155,18 @@ if [ '${COMPOSE_UP[$TARGET]}' = '1' ]; then
|
||||
fi
|
||||
done
|
||||
podman-compose -f '${COMPOSE[$TARGET]}' up -d
|
||||
|
||||
# A Caddyfile render is a bind-mount content change, not a container
|
||||
# config change: the caddy container often survives 'up -d' and keeps
|
||||
# serving its in-memory config. Reload explicitly; the file watcher
|
||||
# (admin on) is the backstop if the API is not up yet.
|
||||
for i in 1 2 3 4 5; do
|
||||
if podman exec caddy caddy reload --config /etc/caddy/Caddyfile --adapter caddyfile >/dev/null 2>&1; then
|
||||
echo \" Caddy reloaded.\"
|
||||
break
|
||||
fi
|
||||
sleep 3
|
||||
done
|
||||
else
|
||||
echo '[4/4] Skipping compose restart (stack runs as bare containers on this host)'
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user