services: app: build: . ports: - "8000:8000" env_file: - .env environment: DATABASE_URL: postgresql+asyncpg://postgres:postgres@db:5432/adiuva depends_on: db: condition: service_healthy restart: unless-stopped db: image: postgres:16-alpine environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: adiuva volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s timeout: 5s retries: 5 restart: unless-stopped # Optional Redis for future rate-limit or caching needs # redis: # image: redis:7-alpine # restart: unless-stopped volumes: postgres_data: