I want to run more than a single command in a dyno.
The quickest way is to list the commands to run, each followed by an
&, with a
wait -n in the end, in the
web: puma -C config/puma.rb & sidekiq & wait -n
This runs all the command in the background.
wait -n exits when at least one of the commands exits and triggers the dyno to restart. Please watch the app metrics so that the commands don't exhaust memory and CPU.
This method is not recommended for production applications. We recommend separate process types to allow process isolation, scaling, and monitoring.