mirror of
https://github.com/ggogel/seafile-containerized.git
synced 2024-11-16 09:01:38 +00:00
seafile-caddy: improved lifecycle management
Exits container if caddy service exits.
This commit is contained in:
parent
db00d4c6b4
commit
94d3ed3e9e
|
@ -1,5 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
/scripts/swarm-dns.sh &
|
||||
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 $?
|
|
@ -1,10 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ "$SWARM_DNS" = true ]; then
|
||||
cp /etc/caddy/Caddyfile /etc/caddy/Caddyfile.default
|
||||
|
||||
cp /etc/caddy/Caddyfile /etc/caddy/Caddyfile.default
|
||||
|
||||
while true; do
|
||||
while true; do
|
||||
|
||||
SEAHUB_IPS=$(dig +short $SEAHUB_HOSTNAME | sed -e 's/$/:8000/' | tr ' ' '\n' | sort | tr '\n' ' ')
|
||||
SEAHUB_MEDIA_IPS=$(dig +short $SEAHUB_MEDIA_HOSTNAME | sed -e 's/$/:80/' | tr ' ' '\n' | sort | tr '\n' ' ')
|
||||
|
@ -24,5 +22,4 @@ if [ "$SWARM_DNS" = true ]; then
|
|||
|
||||
sleep 10
|
||||
|
||||
done
|
||||
fi
|
||||
done
|
Loading…
Reference in a new issue