Docker Compose (dev)
Run the local dependency stack with Make targets, migrate Postgres, seed dev fixtures, and start auth and proxy on the host.
Phase 1 local development runs data stores in Docker and Go services on the host for fast iteration. The compose file under infra/compose/dev/ ships Postgres (pgvector), Redis Stack, ClickHouse, and MinIO — no application containers.
Compose services and ports
| Service | Image | Host port | Purpose |
|---|---|---|---|
| Postgres + pgvector | pgvector/pgvector:pg16 | 5432 | Primary OLTP + migrations |
| Redis Stack | redis/redis-stack:7.4.0-v1 | 6379 | Rate limits, readiness probes |
| ClickHouse | clickhouse/clickhouse-server:24.8 | 8123 (HTTP), 9002 (native) | Analytics (Phase 2+) |
| MinIO | minio/minio | 9000 (API), 9001 (console) | Object storage (Phase 2+) |
ClickHouse native is mapped to 9002 so it does not collide with MinIO on 9000.
Application services (run separately on the host):
| Service | HTTP | gRPC | Notes |
|---|---|---|---|
| Proxy | 8080 | — | /health, /ready, /metrics, /v1/* |
| Auth | 8081 | 9091 | gRPC ValidateToken / ValidateAgent |
Boot sequence
Start dependencies
From the repo root: make compose-dev-up. Waits for healthy Postgres and Redis.
Apply migrations
make db-migrate is idempotent. Use make db-version to inspect the current revision.
Seed dev fixtures
make db-seed inserts a fixed org, agent, and PAT. Never run against staging or production.
Run auth and proxy
cd services/auth && go run . then cd services/proxy && go run . in separate terminals.
Smoke test
make dev-smoke checks /health, /ready, auth failures, and the chat 501 stub.
Make targets
make help # list all targets
make compose-dev-up # start infra/compose/dev stack
make compose-dev-down # stop containers (keep volumes)
make compose-dev-reset # stop + delete volumes (fresh Postgres)
make compose-dev-ps # container status
make compose-dev-logs # tail dependency logs
make db-migrate # apply pending migrations
make db-migrate-down # roll back one step (dev only)
make db-seed # idempotent dev org/agent/PAT
make dev-smoke # end-to-end auth + proxy smokeVerify the stack
curl -s http://localhost:8080/health | jq
curl -s http://localhost:8081/ready | jq
docker compose -f infra/compose/dev/docker-compose.yml exec postgres pg_isready -U ibex -d ibexDev PAT from seed
After make db-seed, use the wire-form PAT from ADR-0007:
ibex_pat_00000000-0000-0000-0000-000000000004_LOCALDEVELOPMENTONLYFixed IDs: org …0001, agent …0003. Full values print in the seed script output.
Next steps
- Environment variables — proxy, auth, Postgres, Redis
- Proxy health —
/health,/ready,/metricscontract
Was this page helpful?
Last updated on