mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-02-15 22:10:04 +00:00
fix: stop container if Caddy, the frontend or the backend fails
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user