One binary. Four commands.
A Rainier application ships as one static binary that serves HTTP, works the queue, runs the schedule and migrates the database. The sample and the production apps build it with musl on Alpine.
What you get
serve,queue:work,schedule:work,migrate— one image, several process types.cargo rainier features --env .env.productionsizes the build to the drivers that environment uses.- A setting the framework cannot honour fails the boot, naming the variable.
- Graceful shutdown, health checks and build identification are documented, not left as exercises.
In the docs
terminal
# Size the build from the environment it will run in.
cargo rainier features --env .env.production
# One binary, four process types.
app serve # the web server
app queue:work # one or more workers
app schedule:work # the scheduler, if you have no cron
app migrate # once per deploy
Up close
Select an image to see it full size.