40 lines
1.2 KiB
YAML
40 lines
1.2 KiB
YAML
# Local dev for matchmaking-v2 in isolation (prod wiring lives in the growqr monorepo compose).
|
|
services:
|
|
matchmaking-v2:
|
|
build: .
|
|
container_name: matchmaking-v2
|
|
ports:
|
|
- "8006:8000"
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
# inside the compose network the DB host is `postgres` (overrides the host-dev .env value)
|
|
DATABASE_URL: postgresql+asyncpg://matchmaking:matchmaking@postgres:5432/matchmaking
|
|
command: sh -c "alembic upgrade head && exec uvicorn app.main:app --host 0.0.0.0 --port 8000"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
|
|
# Durable per-user feed store (fixes "matches disappear on navigation"). Dedicated, not shared.
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: matchmaking-postgres
|
|
environment:
|
|
POSTGRES_USER: matchmaking
|
|
POSTGRES_PASSWORD: matchmaking
|
|
POSTGRES_DB: matchmaking
|
|
ports:
|
|
- "5446:5432" # host-dev uvicorn connects via localhost:5446
|
|
volumes:
|
|
- mmpgdata:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U matchmaking"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 10
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
mmpgdata:
|