Playbook: v32-prod drops off prod-v-3-net on recreate
Service: v32-prod (W3 backend, api.w3.pinbox24.com) on bms-1 (94.23.26.113)
Last updated: 2026-07-11 · Issue: radieu/p24-infra#2826
Trigger / symptoms
- After a
docker compose up -dor container recreate on bms-1,v32-prodis ontest-netonly. - Intended topology (matching siblings
v32-prod-reso,v32-prod-socket) isprod-v-3-net+test-net. api.w3.pinbox24.commay still return 200 becausenginx-proxyis also attached totest-net, so routing can survive via that path — but the documented topology is wrong and is fragile.
Root cause
The live deploy uses the on-server working-tree compose file, not GitLab’s committed version:
/home/gitlab-runner/builds/eZQeLfuJe/0/pinbox24/p24-v-3.2/docker-compose.yml
The committed GitLab pinbox24/p24-v-3.2 master compose (ae2981a) is stale — it has no
reso/socket/redis and no prod-v-3-net. The real topology lives as uncommitted local modifications
to that file. If the backend (v32-prod) service block omits prod-v-3-net while the sibling blocks
list it, every recreate brings v32-prod up on test-net only.
Fix (durable)
Add prod-v-3-net to the backend service networks: in the on-server compose file (both networks
are already declared external):
backend:
container_name: v32-prod
...
networks:
- test-net
- prod-v-3-net # parity with reso/socket; persists across recreateThen apply immediately with no downtime:
# PLAYBOOK: v32-prod-prod-v-3-net-persistence.md
ssh -i ~/.ssh/vps_root_key root@94.23.26.113 'docker network connect prod-v-3-net v32-prod'Verify:
docker inspect v32-prod --format '{{range $k,$v := .NetworkSettings.Networks}}{{$k}} {{end}}'
# expect: prod-v-3-net test-net
curl -s -o /dev/null -w '%{http_code}\n' https://api.w3.pinbox24.com # expect 200⚠️ Do NOT
- Never run bare
docker-compose configon this dir in an agent session — it resolvesenv_file(backend-environment.env) and prints all W3 prod credential values to stdout (see incident #3750). Inspect withgrep -nE 'networks|test-net|prod-v-3-net' docker-compose.ymloryqinstead.
Known limitation / follow-up
The committed GitLab compose diverges from the live working tree. If a CI run ever hard-resets the
working tree (git checkout -f), the entire live topology — not just this network line — is lost.
Reconciling the committed compose with the deployed reality is a separate task requiring a GitLab MR.