broke2026-08-05draft
Postgres resolved to the wrong container
A service called postgres on a shared Docker network is not unique enough. The app connected to another project's database.
Compose registers each service name as a DNS alias on every network it joins. The app joined
two networks, its own and the shared one that carries the mail relay, and there was a
postgres on both. Docker’s resolution across two networks is not deterministic, so
sometimes the app got the right database and sometimes it got a stranger’s.
The fix was a rename, lystz-postgres, and nothing else. A custom networks: block with
aliases looked cleaner and fought with how Coolify wires its default network, silently
creating a second, disconnected one.
What I keep from it: on a shared host, a service name is a global name.