The Supabase-collision case: a compose file with a fixed identity — top-level
name: acme, per-service container_name:, and a literal 8080 host port.
Run docker compose up from a second checkout of this project and:
- both checkouts resolve to the same Compose project
acme, so the seconduphijacks the first stack (recreates its containers from the other checkout's files) instead of starting a second one; - the fixed
container_name: acme_api/acme_dbalready exist, so the seconduprefuses to start; - the literal host port
8080is already bound — port conflict.
wtb create rewrites the worktree's compose copy so each worktree is its own stack:
name: acme→acme-<branch-slug>container_name: acme_api→acme_api-<branch-slug>(same foracme_db)DB_PORTbumped to the next free port in the copied.envand propagated into the compose${DB_PORT:-54322}default- the literal
8080host port remapped to a free one, with the port change reflected inAPI_URL=http://localhost:8080
wtb doctor surfaces exactly these findings (fixed name:/container_name:,
literal host ports) before you create anything.
examples/try.sh compose-identity feature/demo # dry-run
examples/try.sh compose-identity feature/demo --real # real (needs Docker)