Running multiple employees in Procfile (development environment against Heroku)

I have a simple Procfile that states:

web: bundle exec rails server thin -p $PORT
worker: bundle exec rake jobs:work

In Heroku, this will launch N work tasks, where N is what I scaled.

In my development system

$ foreman start

runs only one work task. If I want to run three workers, I need a Procfile that looks like this:

web: bundle exec rails server thin -p $PORT
worker: bundle exec rake jobs:work
worker: bundle exec rake jobs:work
worker: bundle exec rake jobs:work

This is a somewhat pedantic question, but if I want my development environment to behave like my Heroku environment, what is the best way to run N work tasks? Is it an approved way to create (e.g. Procfile_local) and use it through foreman -f Procfile_local?

+5
source share
2 answers

. , man ?;)

foreman start --concurrency="web=0,worker=6"

. Procfile.

+14

Foreman --formation.

, :

foreman start --formation="web=1,worker=2"

+3

All Articles