Port conflict when running docker compose with local PostgreSQL instance #1322
Closed
Syedowais312
started this conversation in
Ideas
Replies: 1 comment
-
|
Not a bug. Just know what you're doing. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When running
docker compose -f ./docker/docker-compose.yml up --detach, if a local PostgreSQL instance is already running on port 5432, the setup fails with:This is a common scenario for developers who have PostgreSQL installed locally. The user has to manually stop their local instance (
sudo systemctl stop postgresql) to proceed, which is not obvious.Possible fixes I'm considering:
compose.postgres.ymldocumenting the conflict and how to resolve it${PGWATCH_POSTGRES_PORT:-5432}:5432with a wrapper script indocker/scripts/that auto-detects port conflicts and sets the env var before invoking composeWould love to hear your thoughts on this.
CC: @pashagolub @0xgouda
Beta Was this translation helpful? Give feedback.
All reactions