1
0
mirror of https://github.com/pocket-id/pocket-id.git synced 2026-02-15 04:40:15 +00:00

fix: stop container if Caddy, the frontend or the backend fails

This commit is contained in:
Elias Schneider
2025-03-25 16:40:53 +01:00
parent de9a3cce03
commit e6f50191cf

View File

@@ -9,12 +9,15 @@ if [ "$CADDY_DISABLED" != "true" ]; then
# Check if TRUST_PROXY is set to true and use the appropriate Caddyfile # Check if TRUST_PROXY is set to true and use the appropriate Caddyfile
if [ "$TRUST_PROXY" = "true" ]; then if [ "$TRUST_PROXY" = "true" ]; then
caddy start --adapter caddyfile --config /etc/caddy/Caddyfile.trust-proxy & caddy run --adapter caddyfile --config /etc/caddy/Caddyfile.trust-proxy &
else else
caddy start --adapter caddyfile --config /etc/caddy/Caddyfile & caddy run --adapter caddyfile --config /etc/caddy/Caddyfile &
fi fi
else else
echo "Caddy is disabled. Skipping..." echo "Caddy is disabled. Skipping..."
fi fi
# Set up trap to catch child process terminations
trap 'exit 1' SIGCHLD
wait wait