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.production sizes 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.

cargo rainier features reads the production env file and the source tree and prints the exact feature set to build, with the reason for each.
One binary, four processes: serve, queue:work, schedule:work and migrate are subcommands of the same build.
All features

Type to search 2.0.0 docs.