fix(deploy): drop compose_default join from web (postgres collision on shared host) #55

Merged
janpeter merged 1 commit from fix/web-drop-compose-default-join into main 2026-06-19 13:42:51 +02:00
Owner

What

Remove the compose_default network join from the web service in deploy/docker-compose.yml (web's membership + the copilot external-network alias).

Why (regression from #54)

#54 joined web to external compose_default to resolve scrum4me-copilot by container name. But the in-app /api/s4m proxy reaches the copilot via S4M_COPILOT_URL (the scrum4me-srv tailnet IP), not docker DNS — so the join is unused.

On the max2 deploy host, compose_default already exists and owns its own postgres service. Joining it made web resolve hostname postgres to scrum4me-postgres (no media role) instead of media-organizer-postgres → silent Prisma P1000/28P01 at runtime. The migrate container sits only on the project default network, so it authenticated fine and the deploy looked green while the live app could not reach its own DB.

Fix

Drop the join. web now uses the project default network alongside postgres/migrate; the copilot stays reachable via S4M_COPILOT_URL on any host (host-agnostic, no shared docker network needed).

Status

  • Diagnosed on max2 during the copilot host-side rollout.
  • A durable runtime workaround is already live on max2 (DATABASE_URL pinned to media-organizer-postgres); this PR is the clean upstream fix so a future from-scratch redeploy can't reintroduce the collision.
  • YAML/compose validates locally. Please confirm on the next max2 redeploy.

🤖 Generated with Claude Code

## What Remove the `compose_default` network join from the `web` service in `deploy/docker-compose.yml` (web's membership + the `copilot` external-network alias). ## Why (regression from #54) #54 joined `web` to external `compose_default` to resolve `scrum4me-copilot` by container name. But the in-app `/api/s4m` proxy reaches the copilot via `S4M_COPILOT_URL` (the scrum4me-srv **tailnet IP**), not docker DNS — so the join is unused. On the **max2** deploy host, `compose_default` already exists and owns its **own** `postgres` service. Joining it made `web` resolve hostname `postgres` to `scrum4me-postgres` (no `media` role) instead of `media-organizer-postgres` → silent **Prisma P1000/28P01** at runtime. The `migrate` container sits only on the project `default` network, so it authenticated fine and the deploy **looked green** while the live app could not reach its own DB. ## Fix Drop the join. `web` now uses the project `default` network alongside `postgres`/`migrate`; the copilot stays reachable via `S4M_COPILOT_URL` on any host (host-agnostic, no shared docker network needed). ## Status - Diagnosed on max2 during the copilot host-side rollout. - A durable runtime workaround is already live on max2 (`DATABASE_URL` pinned to `media-organizer-postgres`); this PR is the clean upstream fix so a future from-scratch redeploy can't reintroduce the collision. - YAML/compose validates locally. Please confirm on the next max2 redeploy. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(deploy): drop compose_default network join from web
Some checks failed
CI / docker-build (pull_request) Failing after 3s
009b8ff00d
PR #54 joined the `web` service to the external `compose_default`
network (aliased `copilot`) to resolve `scrum4me-copilot` by container
name. But the in-app proxy reaches the copilot via S4M_COPILOT_URL (the
scrum4me-srv tailnet IP), not docker DNS, so the join is unused.

On the max2 deploy host `compose_default` already exists and owns a
`postgres` service, so joining it made `web` resolve the hostname
`postgres` to scrum4me-postgres (no `media` role) instead of
media-organizer-postgres -> silent Prisma P1000/28P01 at runtime. The
`migrate` container is only on the project default network, so it
authenticated fine and the deploy looked green while the live app could
not reach its own DB.

Dropping the join leaves `web` on the project default network alongside
postgres/migrate; the copilot stays reachable via S4M_COPILOT_URL on any
host. Diagnosed on max2.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
janpeter/Media-Organizer!55
No description provided.