2025-12-03 11:02:31 +01:00
|
|
|
services:
|
|
|
|
|
db:
|
|
|
|
|
image: postgres:16-alpine
|
|
|
|
|
container_name: orchestrator-db
|
|
|
|
|
environment:
|
|
|
|
|
POSTGRES_USER: orchestrator
|
|
|
|
|
POSTGRES_PASSWORD: orchestrator
|
|
|
|
|
POSTGRES_DB: orchestrator
|
|
|
|
|
ports:
|
2025-12-04 14:08:44 +01:00
|
|
|
- "5433:5432" # OK to leave; remove if you don't need host access
|
2025-12-03 11:02:31 +01:00
|
|
|
volumes:
|
|
|
|
|
- postgres_data:/var/lib/postgresql/data
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD-SHELL", "pg_isready -U orchestrator -d orchestrator"]
|
|
|
|
|
interval: 5s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 5
|
|
|
|
|
|
|
|
|
|
api:
|
|
|
|
|
build: .
|
|
|
|
|
container_name: orchestrator-api
|
2025-12-04 14:08:44 +01:00
|
|
|
restart: unless-stopped
|
|
|
|
|
# Bind only to localhost, and use 8100 externally
|
2025-12-03 11:02:31 +01:00
|
|
|
ports:
|
2025-12-04 14:08:44 +01:00
|
|
|
- "127.0.0.1:8100:8000"
|
2025-12-03 11:02:31 +01:00
|
|
|
environment:
|
|
|
|
|
DATABASE_URL: postgresql+asyncpg://orchestrator:orchestrator@db:5432/orchestrator
|
2025-12-04 14:08:44 +01:00
|
|
|
DEBUG: "false" # set false in prod
|
2025-12-03 11:02:31 +01:00
|
|
|
APP_NAME: "LetsBe Orchestrator"
|
2025-12-07 11:24:46 +01:00
|
|
|
ADMIN_API_KEY: "${ADMIN_API_KEY}" # Required for admin endpoints (token management)
|
2025-12-04 14:08:44 +01:00
|
|
|
# optionally, if your app supports it:
|
|
|
|
|
# BASE_URL: https://orchestrator.example.com
|
2025-12-03 11:02:31 +01:00
|
|
|
depends_on:
|
|
|
|
|
db:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
volumes:
|
|
|
|
|
- ./app:/app/app
|
|
|
|
|
- ./alembic:/app/alembic
|
2025-12-04 14:08:44 +01:00
|
|
|
command: uvicorn app.main:app --host 0.0.0.0 --port 8000
|
2025-12-03 11:02:31 +01:00
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
postgres_data:
|