ADR-0001: Postgres on port 5433 to avoid hummingbot conflict¶
- Status: Accepted
- Date: 2026-04-26
- Deciders: MASTER
Context¶
The development machine (Windows desktop, primary personal box) already runs a Postgres instance on the default port 5432 for the hummingbot trading framework. Standing up a second Postgres for 961tech on the same port would conflict at the host level.
Decision¶
The 961tech development Postgres listens on host port 5433. This is configured in docker-compose.yml (port mapping 5433:5432) and threaded through prisma.config.ts and .env via the DATABASE_URL.
Inside the container, Postgres still listens on its default 5432 — only the host-side port is shifted. Production deployments are unaffected; they bind however the host environment is configured.
Consequences¶
Positive¶
- No conflict with hummingbot or any other Postgres on the dev box
- Local connections from the Next.js app, Prisma CLI, and
psqlall consistently use 5433 via the env var
Negative¶
- Anyone cloning the repo and trying to connect with default tools (e.g.,
psql -d 961techwithout-p 5433) will hit "connection refused" - Need to remember to reference 5433 in any new tooling scripts; mitigated by always sourcing from
DATABASE_URL
Neutral¶
- Slightly nonstandard for new contributors; documented in the README and at the top of
docker-compose.yml
Alternatives considered¶
Stop the hummingbot Postgres when working on 961tech¶
Rejected because both projects are active in parallel and switching is friction. Also fragile — easy to forget which is running.
Run hummingbot's Postgres on the nonstandard port instead¶
Rejected because hummingbot is older and has more tooling assuming 5432; 961tech is the newer project so it absorbs the cost.
Use a different DB altogether for one of them (e.g., SQLite for 961tech dev)¶
Rejected because Prisma + Postgres-specific features (JSONB queries, pg_trgm for fuzzy match) are used heavily; SQLite would diverge dev from prod.
References¶
docker-compose.yml— port mapping.env.example—DATABASE_URLshapeprisma.config.ts— Prisma 7 readsurlfrom here, not fromschema.prisma