refactor(network): check for existing coolify network before creation
This commit is contained in:
@@ -30,10 +30,12 @@ fi
|
|||||||
|
|
||||||
# Make sure coolify network exists
|
# Make sure coolify network exists
|
||||||
# It is created when starting Coolify with docker compose
|
# It is created when starting Coolify with docker compose
|
||||||
|
if ! docker network inspect coolify >/dev/null 2>&1; then
|
||||||
if ! docker network create --attachable --ipv6 coolify 2>/dev/null; then
|
if ! docker network create --attachable --ipv6 coolify 2>/dev/null; then
|
||||||
echo "Failed to create coolify network with ipv6. Trying without ipv6..."
|
echo "Failed to create coolify network with ipv6. Trying without ipv6..."
|
||||||
docker network create --attachable coolify 2>/dev/null
|
docker network create --attachable coolify 2>/dev/null
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
# docker network create --attachable --driver=overlay coolify-overlay 2>/dev/null
|
# docker network create --attachable --driver=overlay coolify-overlay 2>/dev/null
|
||||||
|
|
||||||
if [ -f /data/coolify/source/docker-compose.custom.yml ]; then
|
if [ -f /data/coolify/source/docker-compose.custom.yml ]; then
|
||||||
|
@@ -30,10 +30,12 @@ fi
|
|||||||
|
|
||||||
# Make sure coolify network exists
|
# Make sure coolify network exists
|
||||||
# It is created when starting Coolify with docker compose
|
# It is created when starting Coolify with docker compose
|
||||||
|
if ! docker network inspect coolify >/dev/null 2>&1; then
|
||||||
if ! docker network create --attachable --ipv6 coolify 2>/dev/null; then
|
if ! docker network create --attachable --ipv6 coolify 2>/dev/null; then
|
||||||
echo "Failed to create coolify network with ipv6. Trying without ipv6..."
|
echo "Failed to create coolify network with ipv6. Trying without ipv6..."
|
||||||
docker network create --attachable coolify 2>/dev/null
|
docker network create --attachable coolify 2>/dev/null
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
# docker network create --attachable --driver=overlay coolify-overlay 2>/dev/null
|
# docker network create --attachable --driver=overlay coolify-overlay 2>/dev/null
|
||||||
|
|
||||||
if [ -f /data/coolify/source/docker-compose.custom.yml ]; then
|
if [ -f /data/coolify/source/docker-compose.custom.yml ]; then
|
||||||
|
Reference in New Issue
Block a user