siegebreak/services/docker-compose.yml
caelum0x 8449f89be9 test: add integration suite against real Postgres + Redis
- test-integration/flows.test.ts: 8 end-to-end flows through the app with
  no mocks — onboarding + deck save, refresh-token rotation, matchmaking
  pairing (verifies deckId survives the match transition), and match
  completion -> leaderboard with idempotency.
- vitest.integration.config.ts: isolated Redis logical DB, real DATABASE_URL;
  serial execution with per-test truncate/flush.
- package.json: test:integration script.
- docker-compose.yml: add a postgres service for local dev/integration.
- services-ci.yml: GitHub Actions job running unit + integration tests with
  Postgres/Redis service containers on every services/ PR.
- DEVELOPMENT.md: document the integration workflow.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-25 18:19:12 +03:00

30 lines
714 B
YAML

# Local dev only. Production uses Neon (Postgres) + a managed Redis —
# this compose file exists to run the API (and integration tests) against
# something locally, not to describe the production topology.
services:
api:
build: .
ports:
- "8080:8080"
env_file: .env
depends_on:
- postgres
- redis
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: siegebreak_test
ports:
- "5432:5432"
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 5s
timeout: 5s
retries: 10
redis:
image: redis:7-alpine
ports:
- "6379:6379"