seafile-caddy: improved lifecycle management

Exits container if caddy service exits.
This commit is contained in:
Gerrit Gogel 2024-02-14 10:56:35 +01:00
parent db00d4c6b4
commit 94d3ed3e9e
2 changed files with 25 additions and 22 deletions

View file

@ -1,5 +1,11 @@
#!/bin/bash
if [ "$SWARM_DNS" = true ]; then
/scripts/swarm-dns.sh &
fi
caddy run --config /etc/caddy/Caddyfile --adapter caddyfile
caddy run --config /etc/caddy/Caddyfile --adapter caddyfile &
wait -n
exit $?

View file

@ -1,7 +1,5 @@
#!/bin/bash
if [ "$SWARM_DNS" = true ]; then
cp /etc/caddy/Caddyfile /etc/caddy/Caddyfile.default
while true; do
@ -25,4 +23,3 @@ if [ "$SWARM_DNS" = true ]; then
sleep 10
done
fi