Skip to main content
This example uses no built-in Python template. The orchestrator uses a repo-owned docker-compose.preview.yml (or docker-compose.preview.yaml) in the repository root and injects host ports for the app and db so nginx can route correctly.

Repository

Stack

  • Framework: FastAPI (Python)
  • Database: PostgreSQL (async, SQLAlchemy)
  • Cache: Redis
  • Config: .env (DATABASE_URL, REDIS_URL)
  • Health: GET /health (DB + Redis status)
  • Endpoints: GET /, GET /docs, GET /items, GET /admins, etc.
  • Seeder: python -m scripts.seed_admin (optional, run separately or in startup)

Key files

docker-compose.preview.yml (repository root) — required

For Python there is no built-in template, so you must provide a preview compose file. Use service names app and db; do not set host ports—the orchestrator injects them. Example structure (adjust image/build and env to match your repo):
The orchestrator writes docker-compose.preview.generated.yml with the injected ports and runs docker compose against that file.

preview-config.yml (repository root) — required

You must add preview-config.yml with all required fields. Set framework: python so the orchestrator knows the app port and entrypoint; when you provide docker-compose.preview.yml, the orchestrator still uses it for compose and uses preview-config.yml for validation, health check path, and optional build/startup commands.

Local run and API

See the repo README for:
  • Venv, pip install -r requirements.txt
  • DATABASE_URL, REDIS_URL in .env
  • python -m scripts.seed_admin, uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
Endpoints: /health, /docs, /items, /admins, etc.