mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-05-31 16:00:09 +00:00
fix: prevent mastercontainer race condition and add AIO_LOG_LEVEL defaults in container scripts
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/1b34e6db-7e7c-426e-addf-cce3ef7c5944 Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
0a553459ab
commit
1f86bc2aae
@@ -59,6 +59,15 @@ fi
|
||||
|
||||
# Wait for watchtower to stop
|
||||
if [ "$AUTOMATIC_UPDATES" = 1 ]; then
|
||||
# Give Docker time to register the container as running before checking for it.
|
||||
# Without this, there is a race condition where the check below runs before watchtower
|
||||
# appears in `docker ps`, causing the script to skip the wait and continue with
|
||||
# the potentially outdated mastercontainer code while watchtower is still updating it.
|
||||
count=0
|
||||
while ! docker ps --format "{{.Names}}" | grep -q "^nextcloud-aio-watchtower$" && [ "$count" -lt 12 ]; do
|
||||
sleep 5
|
||||
count=$((count + 1))
|
||||
done
|
||||
if ! docker ps --format "{{.Names}}" | grep -q "^nextcloud-aio-watchtower$"; then
|
||||
echo "Something seems to be wrong: Watchtower should be started at this step."
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user