Skip to content

Add Docker Compose for local Postgres + Redis - #61

Merged
Muhammadcodes112 merged 1 commit into
MiHashport:mainfrom
chillwur:issue-1-docker-compose-postgres-redis
Jul 10, 2026
Merged

Muhammadcodes112 merged 1 commit into
MiHashport:mainfrom
chillwur:issue-1-docker-compose-postgres-redis

Conversation

@chillwur

Copy link
Copy Markdown
Contributor

Problem

The backend's .env.example documents DATABASE_URL and REDIS_URL, but there was no local way to stand up those services. As a result, apps/backend/src/services/stellar.ts falls back to an in-memory Map for wallet storage, since there's nowhere to persist to. This blocks backend work on wallets, transaction history, and conversation state, and forces contributors to depend on a cloud database just to develop locally.

Solution

  • Added a docker-compose.yml at the repo root defining postgres:16 and redis:7 services, with credentials matching the defaults already documented in apps/backend/.env.example (hashport/hashport/hashport for Postgres, no-auth Redis on the default port).
  • Both services use named volumes (postgres-data, redis-data) so data survives container restarts.
  • Both services have health checks (pg_isready for Postgres, redis-cli ping for Redis) so docker compose up reports readiness.
  • Added root package.json scripts: pnpm dev:infra (starts the containers in the background) and pnpm dev:infra:down (stops them).
  • Updated CONTRIBUTING.md's Setup section to include the pnpm dev:infra step and a note that the example env vars already match the compose defaults.

closes #1

@Muhammadcodes112
Muhammadcodes112 merged commit 8ecc02b into MiHashport:main Jul 10, 2026
1 of 2 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.

Add Docker Compose for local Postgres + Redis

2 participants