diff --git a/docker-compose.example.yml b/docker-compose.example.yml index 870bb5c..e69b7ef 100644 --- a/docker-compose.example.yml +++ b/docker-compose.example.yml @@ -44,3 +44,4 @@ services: networks: default: name: hoerdle_default + external: true diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 30b92c0..f6d44b1 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -54,6 +54,19 @@ git pull echo "🏷️ Fetching git tags..." git fetch --tags +# Prüfe und erstelle/repariere Netzwerk falls nötig +echo "🌐 Prüfe Docker-Netzwerk..." +if ! docker network ls | grep -q "hoerdle_default"; then + echo " Netzwerk existiert nicht, erstelle es..." + docker network create hoerdle_default + echo "✅ Netzwerk erstellt" +else + # Prüfe ob Netzwerk falsche Labels hat (wird durch external: true umgangen) + echo "✅ Netzwerk existiert bereits" + echo " (Hinweis: Falls Warnungen über falsche Labels erscheinen, verwende: ./scripts/fix-network.sh)" +fi +echo "" + # Build new image in background (doesn't stop running container) echo "🔨 Building new Docker image (this runs while app is still online)..." docker compose build