refactor(network): check for existing coolify network before creation
This commit is contained in:
@@ -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
|
||||
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
|
||||
|
||||
|
@@ -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
|
||||
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
|
||||
|
||||
|
Reference in New Issue
Block a user