docker-compose.preview.yml (or docker-compose.preview.yaml) in the repository root and injects host ports for the app and db.
Repository
- Repo: rust-project-preview-example — replace with your repo URL when published.
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):
docker-compose.preview.generated.yml with injected ports and runs docker compose against it.
preview-config.yml (optional)
You can add preview-config.yml for:
health_check_path: e.g./healthor/readybuild_commands: e.g.cp .env.example .envenv: extra env vars
framework: rust; the presence of docker-compose.preview.yml tells the orchestrator to use your compose file.
Local run and API
See the repo README for:cp .env.example .env, setDATABASE_URLandREDIS_URLcreatedb preview_example,cargo run- App listens on
http://0.0.0.0:8080
/health, /ready, /ping, /stats. Port and routing are handled by the orchestrator when using the injected compose.