2026-02-20 20:08:17 +01:00
|
|
|
services:
|
|
|
|
|
test-db:
|
|
|
|
|
image: postgres:16-alpine
|
|
|
|
|
ports:
|
|
|
|
|
- "5433:5432"
|
|
|
|
|
environment:
|
|
|
|
|
- POSTGRES_USER=postgres
|
|
|
|
|
- POSTGRES_PASSWORD=postgres
|
|
|
|
|
- POSTGRES_DB=nuzlocke_test
|
|
|
|
|
tmpfs:
|
|
|
|
|
- /var/lib/postgresql/data
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
|
|
|
interval: 2s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 10
|
|
|
|
|
restart: "no"
|
|
|
|
|
|
|
|
|
|
test-api:
|
|
|
|
|
build:
|
|
|
|
|
context: ./backend
|
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
|
ports:
|
2026-02-21 16:29:04 +01:00
|
|
|
- "8100:8000"
|
2026-02-20 20:08:17 +01:00
|
|
|
environment:
|
|
|
|
|
- DATABASE_URL=postgresql+asyncpg://postgres:postgres@test-db:5432/nuzlocke_test
|
|
|
|
|
- DEBUG=true
|
|
|
|
|
depends_on:
|
|
|
|
|
test-db:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD-SHELL", "curl -f http://localhost:8000/ || exit 1"]
|
|
|
|
|
interval: 3s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 15
|
|
|
|
|
restart: "no"
|