Skip to main content
This example uses no built-in Rust 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.

Repository

Stack

  • Framework: Rust (Axum or similar)
  • Database: PostgreSQL (migrations on startup)
  • Cache: Redis
  • Config: .env (DATABASE_URL, REDIS_URL)
  • Health: GET /health, GET /ready (DB + Redis), GET /ping, GET /stats
  • Migrations and seeder: Run on app startup

Key files

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

For Rust 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 build and env to match your repo):
The orchestrator writes docker-compose.preview.generated.yml with injected ports and runs docker compose against it.

preview-config.yml (repository root) — required

You must add preview-config.yml with all required fields. Set framework: rust 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:
  • cp .env.example .env, set DATABASE_URL and REDIS_URL
  • createdb preview_example, cargo run
  • App listens on http://0.0.0.0:8080
Endpoints: /health, /ready, /ping, /stats. Port and routing are handled by the orchestrator when using the injected compose.