Deploy an application
Every generated project includes a docker-compose.yml, a Dockerfile for the backend and one for
the front end, and CI workflows.
With Docker Compose
docker compose up -d
This starts PostgreSQL, the backend and the front end. The backend container migrates and seeds
before it starts, so a fresh volume comes up with its dictionary, access rules and administrator.
With --db neon, the neon profile drops the PostgreSQL service, and DATABASE_URL points at Neon.
Configuration
| Variable | Purpose |
|---|---|
DATABASE_URL | The PostgreSQL connection. Overrides the default database everywhere |
ADMIN_EMAIL, ADMIN_PASSWORD | The administrator that ensure_admin creates (default admin@admin.com / admin) |
ROLE_ACCOUNT_PASSWORD | The password of the demonstration account created for each role (default admin) |
Change the administrator's and the role accounts' passwords before exposing an application.
Without containers
The backend is a Cargo crate and the front end a Bun package:
cd backend && cargo build --release
cargo loco db migrate && cargo loco db seed
cargo loco start --server-and-worker
cd ../frontend && bun install && bun run build
The backend serves only JSON. Serve the built front end from any web server, and point it at the backend with the API URL chosen at generation.
Health and API description
/api/me/health answers without a token, for readiness probes. /openapi.json describes every
route, and /redoc and /scalar render it.