What is the correct PostgreSQL port to use when connecting from outside Docker?

Viewed 0

What is the correct PostgreSQL port to use when connecting from outside Docker?

1 Answers

Use port 15432 when connecting from your host machine (outside the Docker network) to the PostgreSQL instance running inside Docker. Port 5432 is the internal container port. Also use 127.0.0.1 (not the container's internal IP) as the host. In your .env file, set RAW_HISTORY_DATABASE_PORT=15432, CONFIGURATION_DATABASE_PORT=15432, etc.