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