Skip to content

fix(compose): drop db host port publish to avoid 5432 clash#99

Merged
WhiteMuush merged 1 commit into
mainfrom
fix/compose-db-host-port-clash
Jun 29, 2026
Merged

fix(compose): drop db host port publish to avoid 5432 clash#99
WhiteMuush merged 1 commit into
mainfrom
fix/compose-db-host-port-clash

Conversation

@WhiteMuush

Copy link
Copy Markdown
Owner

Problem

docker compose up crashed the stack on hosts already running Postgres on 5432. The db service published 5432:5432; on recreate the host port bind failed (address already in use), db died, app died with P1001: Can't reach database server at db:5432.

Fix

Remove the db host port publish. The app reaches the database over the internal compose network (db:5432), so publishing to the host was unnecessary. Local Postgres on the host is left untouched.

Trade-off

Host tools (psql/pgAdmin from host) can no longer reach the container db directly. Add a non-conflicting publish (e.g. 5433:5432) locally if needed.

🤖 Generated with Claude Code

Host may already run Postgres on 5432; publishing the db container port
collided and crashed the stack. App reaches db over the internal compose
network (db:5432), so the host publish was unnecessary.
@WhiteMuush WhiteMuush merged commit d20aca2 into main Jun 29, 2026
11 checks passed
@WhiteMuush WhiteMuush deleted the fix/compose-db-host-port-clash branch June 29, 2026 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant