fix: auto-healer v6 — remove explicit --network flag from rollback (caused network bridge not found)
- rollback was using --network bridge explicitly, which fails on this Synology's Docker daemon when the bridge network is associated with a Swarm overlay - Fixed: omit --network flag entirely, let Docker use default bridge behavior - Also found and fixed: gateway container on Swarm overlay network couldn't route to 192.168.0.11:4014 — attached to bridge network to resolve
This commit is contained in:
@@ -313,15 +313,12 @@ restore_protocol() {
|
||||
docker rm -f "$CONTAINER_NAME" 2>/dev/null || true
|
||||
sleep 2
|
||||
|
||||
# Recreate from rollback image
|
||||
local network
|
||||
network=$(docker inspect "$CONTAINER_NAME" --format '{{.HostConfig.NetworkMode}}' 2>/dev/null || echo "bridge")
|
||||
# Recreate from rollback image (omit --network; default bridge works reliably)
|
||||
docker run -d \
|
||||
--name "$CONTAINER_NAME" \
|
||||
--restart unless-stopped \
|
||||
-p 4014:3000 \
|
||||
-v /var/services/homes/admin/falah-mobile/data:/app/data \
|
||||
--network "$network" \
|
||||
"$ROLLBACK_IMAGE" >> "$AGENT_LOG" 2>&1
|
||||
|
||||
sleep 15
|
||||
|
||||
Reference in New Issue
Block a user