services: postgres: image: postgres:16-alpine environment: POSTGRES_USER: football POSTGRES_PASSWORD: football POSTGRES_DB: football ports: - "5432:5432" volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U football"] interval: 5s timeout: 5s retries: 5 api: build: . command: uvicorn src.api.app:app --host 0.0.0.0 --port 8000 --reload ports: - "8000:8000" env_file: .env depends_on: postgres: condition: service_healthy volumes: - ./src:/app/src volumes: pgdata: