Skip to content

chore: make compose ports configurable - #38

Closed
voidash wants to merge 1 commit into
mainfrom
chore/configurable-compose-ports
Closed

voidash wants to merge 1 commit into
mainfrom
chore/configurable-compose-ports

Conversation

@voidash

@voidash voidash commented Sep 27, 2026

Copy link
Copy Markdown
Collaborator

What this changes

  • The host ports in compose.yaml can be overridden with DB_PORT and API_PORT. The defaults are unchanged (5432, 3000). Before this, running the stack next to another Postgres or app on those ports meant editing the file.
  • Documents that the migrate image also runs one-off tasks such as docker compose run --rm migrate bun run db:init.
  • Fixes a stale Dockerfile comment that still mentioned the removed design CSS and fonts.

Closes #37

How to check it

The whole Docker path was tested from a fresh clone of main:

Step Result
docker compose config with no apps/api/.env.local fails with a clear "env file not found" (setup creates it; the README revamp documents this)
docker compose build api image 341 MB, migrate image 2.07 GB
docker compose up -d db healthy → migrate applies migrations and exits 0 → api healthy in ~30 s
/health, /en, /ne, /en/members, /en/issues, /v1/members 200
Security headers from #35 present
Container user node (uid 1000), /app/storage writable
docker compose run --rm migrate bun run db:init on a fresh database project initialised, 14 issues synced; /v1/project 404 → 200
docker compose run --rm migrate bun run sync:github 14 issues synced
down then up data kept, migrations re-run harmlessly
DB_PORT=15432 API_PORT=13000 docker compose up -d stack runs beside another stack that holds 5432 and 3000

Deliberately not changed: the refined database credentials and the volume names. Renaming them would start any existing deployment on an empty volume, so that needs a planned migration.

Checklist

  • One issue per pull request
  • Commits signed off
  • No new dependency
  • No secrets or personal data

The host ports for Postgres and the app were fixed at 5432 and 3000.
They can now be overridden with DB_PORT and API_PORT; the defaults are
unchanged. Also document that the migrate image runs one-off tasks such
as db:init, and fix a Dockerfile comment that still mentioned the
removed design CSS and fonts.

Signed-off-by: voidash <ashish.thapa477@gmail.com>
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.

Compose ports cannot be changed without editing the file

1 participant