Merge pull request #6275 from nextcloud/enh/noid/connect-mastercontainer-to-network

daily-backup.sh: connect mastercontainer to nextcloud-aio network
This commit is contained in:
Simon L. 2025-04-09 16:34:05 +02:00 committed by GitHub
commit 5564f8be5f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -20,6 +20,11 @@ APACHE_PORT="$(docker inspect nextcloud-aio-apache --format "{{.Config.Env}}" |
if [ -z "$APACHE_PORT" ]; then if [ -z "$APACHE_PORT" ]; then
echo "APACHE_PORT is not set which is not expected..." echo "APACHE_PORT is not set which is not expected..."
else else
# Connect mastercontainer to nextcloud-aio network to make sure that nextcloud-aio-apache is reachable
# Prevent issues like https://github.com/nextcloud/all-in-one/discussions/5222
docker network connect nextcloud-aio nextcloud-aio-mastercontainer &>/dev/null
# Wait for apache to start
while docker ps --format "{{.Names}}" | grep -q "^nextcloud-aio-apache$" && ! nc -z nextcloud-aio-apache "$APACHE_PORT"; do while docker ps --format "{{.Names}}" | grep -q "^nextcloud-aio-apache$" && ! nc -z nextcloud-aio-apache "$APACHE_PORT"; do
echo "Waiting for apache to become available" echo "Waiting for apache to become available"
sleep 30 sleep 30