Repository navigation
Make every published host port overridable - #19
Merged
Merged
Conversation
The quickstart already had an escape hatch for Postgres -- point MODELFORGE_DATABASE_URL at your own instance and skip `make db` -- but nothing for the observability stack. Grafana was pinned to 3000, which is taken on any machine running a Node dev server, and Prometheus to 9090. `make up` then fails on a port bind with no documented way out. Add POSTGRES_HOST_PORT, PROMETHEUS_HOST_PORT and GRAFANA_HOST_PORT, defaulting to what they were. The Makefile exports them so `docker compose` picks them up, and DB and TEST_DB are built from POSTGRES_HOST_PORT rather than a literal 5432 -- an override that moved the container but left the connection strings behind would be a knob that breaks things rather than fixing them. `make up` echoes the ports actually in use. Verified both ways: compose resolves the defaults and the overrides, and the documented `make db && make test` runs green end to end on POSTGRES_HOST_PORT=5433 (90.0% coverage). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
sahilkalgutkar
added a commit
that referenced
this pull request
Sep 2, 2026
Make every published host port overridable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The gap
The quickstart already had an escape hatch for Postgres — point
MODELFORGE_DATABASE_URLat your own instance and skipmake db— but nothingfor the observability stack. Grafana was pinned to
3000, which is taken onany machine running a Node dev server, and Prometheus to
9090.make upthenfails on a port bind with no documented way out.
The change
POSTGRES_HOST_PORT,PROMETHEUS_HOST_PORTandGRAFANA_HOST_PORT, eachdefaulting to what it was. The Makefile exports them so
docker composepicksthem up, and
DB/TEST_DBare built fromPOSTGRES_HOST_PORTrather than aliteral
5432— an override that moved the container but left the connectionstrings pointing at the old port would be a knob that breaks things rather than
fixing them.
make upechoes the ports actually in use, and the README gainsthe override table.
Only the host side moves; inside the compose network the services still reach
each other on the standard ports.
Verification
docker compose configresolves the defaults (5432/9090/3000) and theoverrides (5433/9091/3001).
make -n run POSTGRES_HOST_PORT=5433shows the connection string following.make db && make testran green end to end underPOSTGRES_HOST_PORT=5433, total coverage 90.0%.