refactor(network): check for existing coolify network before creation

This commit is contained in:
Andras Bacsai
2025-03-25 12:34:03 +01:00
parent 6dcb5463cb
commit 8f0955bcd8
2 changed files with 10 additions and 6 deletions

View File

@@ -30,9 +30,11 @@ fi
# Make sure coolify network exists
# It is created when starting Coolify with docker compose
if ! docker network create --attachable --ipv6 coolify 2>/dev/null; then
echo "Failed to create coolify network with ipv6. Trying without ipv6..."
docker network create --attachable coolify 2>/dev/null
if ! docker network inspect coolify >/dev/null 2>&1; then
if ! docker network create --attachable --ipv6 coolify 2>/dev/null; then
echo "Failed to create coolify network with ipv6. Trying without ipv6..."
docker network create --attachable coolify 2>/dev/null
fi
fi
# docker network create --attachable --driver=overlay coolify-overlay 2>/dev/null