Skip to content

Conversation

@chasetmartin
Copy link
Collaborator

Why

This PR addresses the following problem / context:

  • The app container did not set POSTGRES_PORT, so it could read the host .env value (54321) or a non-container default. If it uses 54321 inside Docker, db connection will fail because the database is only listening on 5432 within the Docker network.
  • README.md did not completely reflect potential docker development workflow

How

Implementation summary - the following was changed / added / removed:

  • Added POSTGRES_PORT=5432 to the app service environment in docker-compose.yml to ensure container-to-container connections use the internal DB port
  • Update README.md

Notes

Any special considerations, workarounds, or follow-up work to note?

  • The db service still maps 54321:5432; local tools and commands should use POSTGRES_PORT=54321 to communicate to the db service, like setup with the .env.example

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a Docker networking issue where the app container was missing an explicit POSTGRES_PORT environment variable, causing it to potentially use the wrong port when connecting to the database container.

Changes:

  • Set POSTGRES_PORT=5432 in the app service environment to ensure correct container-to-container database connections
  • Restructured README.md to clarify the two development workflow options (local PostgreSQL vs Docker Compose)
  • Added documentation about port mapping (5432 internal, 54321 external) and when to use each

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
docker-compose.yml Added POSTGRES_PORT=5432 environment variable to the app service to fix database connection
README.md Reorganized and clarified development setup options, replacing table layout with clearer sections and adding notes about port configuration

@jirhiker jirhiker merged commit 51825e3 into staging Jan 15, 2026
6 checks passed
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.

3 participants