From 224508a63abe21368569ebb80a239f9b8730b823 Mon Sep 17 00:00:00 2001 From: FZR95 Date: Sun, 19 Jul 2026 13:57:16 +0800 Subject: [PATCH] fix(deploy): isolate tracked compose stack --- .github/workflows/deploy.yml | 15 ++++++++++----- .../pages/__tests__/WorldWeaveProxyConfig.test.ts | 3 +++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9ea4684..7917b3b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -39,9 +39,14 @@ jobs: mkdir -p "$BASE_DIR" # Clone without recursing first; nested submodule auth is configured below. for i in 1 2 3; do git clone "$REPO_URL" "$REPO_DIR" && break || sleep 5; done - fi - cd "$REPO_DIR" - git remote set-url origin "$REPO_URL" + fi + cd "$REPO_DIR" + # Production deploys only the tracked TopicLab stack. In particular, + # do not auto-load stale server-local docker-compose.override files + # that can reintroduce the independently deployed WorldWeave services. + export COMPOSE_FILE="$REPO_DIR/docker-compose.yml" + echo "[deploy] Compose file: $COMPOSE_FILE (local overrides disabled)" + git remote set-url origin "$REPO_URL" SUBMODULE_AUTH="${SUBMODULE_TOKEN:-$GITHUB_TOKEN}" set_submodule_url() { local name="$1" @@ -164,8 +169,8 @@ jobs: fi exit 1 fi - docker compose down - docker compose up -d + docker compose down --remove-orphans + docker compose up -d --remove-orphans for i in $(seq 1 30); do if docker compose exec -T topiclab-backend python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/api/v1/topiclink/health/ready', timeout=5)"; then break diff --git a/frontend/src/pages/__tests__/WorldWeaveProxyConfig.test.ts b/frontend/src/pages/__tests__/WorldWeaveProxyConfig.test.ts index 8512600..75de1f5 100644 --- a/frontend/src/pages/__tests__/WorldWeaveProxyConfig.test.ts +++ b/frontend/src/pages/__tests__/WorldWeaveProxyConfig.test.ts @@ -75,6 +75,9 @@ describe('WorldWeave nginx proxy config', () => { expect(workflow).toContain('WORLDWEAVE_UPSTREAM=http://host\\.docker\\.internal') expect(workflow).toContain('http://127.0.0.1/worldweave/') expect(workflow).toContain('http://127.0.0.1/info/source') + expect(workflow).toContain('export COMPOSE_FILE="$REPO_DIR/docker-compose.yml"') + expect(workflow).toContain('docker compose down --remove-orphans') + expect(workflow).toContain('docker compose up -d --remove-orphans') expect(workflow).not.toContain('docker compose exec -T worldweave') expect(workflow).not.toContain('worldweave-refresh logs') expect(workflow).not.toContain('set_submodule_url worldweave')