Replace astral-sh/setup-uv action with direct curl install to avoid Node.js 18 incompatibility (setup-uv v6+ requires Node 20+). Change e2e test API host port from 8000 to 8100 to avoid conflict with existing service on the CI runner. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
37 lines
843 B
YAML
37 lines
843 B
YAML
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:
|
|
- "8100:8000"
|
|
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"
|