fix: add network-stripping workaround to production deploy.yml #70
@@ -259,10 +259,33 @@ jobs:
|
||||
docker compose -f /nas-dashboard/docker-compose.yml up -d --pull never 2>&1 || true
|
||||
|
||||
if ! docker container inspect nas-dashboard >/dev/null 2>&1; then
|
||||
echo "Compose failed, removing stale containers and retrying..."
|
||||
echo "Compose failed, stripping networks and retrying..."
|
||||
docker rm -f docker-socket-proxy nas-dashboard 2>/dev/null || true
|
||||
docker network create nas-dashboard_internal 2>/dev/null || true
|
||||
docker compose -f /nas-dashboard/docker-compose.yml up -d --pull never 2>&1 || true
|
||||
python3 -c "
|
||||
import os
|
||||
lines = open('/nas-dashboard/docker-compose.yml').readlines()
|
||||
out = []
|
||||
skip_net = False
|
||||
for l in lines:
|
||||
stripped = l.strip()
|
||||
if stripped == 'networks:' and not l[0].isspace():
|
||||
skip_net = True
|
||||
continue
|
||||
if skip_net:
|
||||
if l[0].isspace():
|
||||
continue
|
||||
skip_net = False
|
||||
if stripped == 'networks:' and l[:4].strip() == '':
|
||||
skip_net = True
|
||||
continue
|
||||
if skip_net:
|
||||
if l.startswith(' '):
|
||||
continue
|
||||
skip_net = False
|
||||
out.append(l)
|
||||
open('/tmp/prod-ci.yml','w').writelines(out)
|
||||
"
|
||||
docker compose -f /tmp/prod-ci.yml up -d --pull never 2>&1 || true
|
||||
fi
|
||||
|
||||
if ! docker container inspect nas-dashboard >/dev/null 2>&1; then
|
||||
|
||||
Reference in New Issue
Block a user