kankwa/docker-compose.restore-test.yml

27 lines
755 B
YAML

name: kankwa-restore-test
services:
db:
image: postgres:16-alpine
environment:
POSTGRES_USER: kankwa_restore
POSTGRES_PASSWORD: kankwa_restore_password
POSTGRES_DB: kankwa_restore_source
healthcheck:
test: ["CMD-SHELL", "pg_isready -U kankwa_restore -d kankwa_restore_source"]
interval: 2s
timeout: 3s
retries: 20
tmpfs:
- /var/lib/postgresql/data
migrate:
build: .
environment:
DATABASE_URL: postgresql+asyncpg://kankwa_restore:kankwa_restore_password@db:5432/kankwa_restore_source
SECRET_KEY: restore-test-secret-only
ENVIRONMENT: test
command: ["python", "-m", "alembic", "upgrade", "head"]
depends_on:
db:
condition: service_healthy