Skip to content

One-command local stack

Bring up a complete local environment (Postgres, API, worker, and Web UI) with Docker Compose.

Prerequisites: - Docker and Docker Compose installed

Services (as defined in docker-compose.yml): - Postgres: localhost:5432 (db=pycharter, user=pycharter, password=pycharter) - API: http://localhost:8002 - UI: http://localhost:3002

Start everything:

docker compose up -d

Or start specific services:

# Database only (waits for health)
docker compose up -d postgres

# API (auto-migrates DB), then worker and UI (each waits for API health)
docker compose up -d api worker ui

Stop:

docker compose down

Reset database state (removes the Postgres volume):

docker compose down -v

Health checks and startup order: - Postgres uses pg_isready -U pycharter - API health: GET http://localhost:8002/health - UI health: GET http://localhost:3002/health - The worker and UI declare depends_on the API with condition: service_healthy

Notes: - The API is configured with RUN_MIGRATIONS=true and will apply pending Alembic migrations on boot. - The UI points to the API at http://api:8002 inside the Compose network and is exposed at http://localhost:3002.