38 lines
973 B
YAML
38 lines
973 B
YAML
|
|
services:
|
||
|
|
db:
|
||
|
|
image: postgres:16-alpine
|
||
|
|
container_name: orchestrator-db
|
||
|
|
environment:
|
||
|
|
POSTGRES_USER: orchestrator
|
||
|
|
POSTGRES_PASSWORD: orchestrator
|
||
|
|
POSTGRES_DB: orchestrator
|
||
|
|
ports:
|
||
|
|
- "5433:5432" # Host port 5433 to avoid conflict with existing Postgres
|
||
|
|
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
|
||
|
|
ports:
|
||
|
|
- "8000:8000"
|
||
|
|
environment:
|
||
|
|
DATABASE_URL: postgresql+asyncpg://orchestrator:orchestrator@db:5432/orchestrator
|
||
|
|
DEBUG: "true"
|
||
|
|
APP_NAME: "LetsBe Orchestrator"
|
||
|
|
depends_on:
|
||
|
|
db:
|
||
|
|
condition: service_healthy
|
||
|
|
volumes:
|
||
|
|
- ./app:/app/app
|
||
|
|
- ./alembic:/app/alembic
|
||
|
|
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
|
||
|
|
|
||
|
|
volumes:
|
||
|
|
postgres_data:
|