ddollar / foreman

Manage Procfile-based applications
http://ddollar.github.com/foreman
MIT License
6.02k stars 632 forks source link

Foreman Procfile with Conditions #699

Open mukesh-zensar opened 6 years ago

mukesh-zensar commented 6 years ago

Is there a way to have foreman conditionally start certain processes in the Procfile? I would like foreman to run both a web and worker but the worker should run on the basis of if else condition .

web: bundle exec unicorn -p 3000 -c config/unicorn.rb
worker: bundle exec sidekiq -C config/sidekiq.yml

but i want something like

web: bundle exec unicorn -p 3000 -c config/unicorn.rb
if redis.connected?
 worker: bundle exec sidekiq -C config/sidekiq.yml
end
alexanderadam commented 6 years ago

I guess #215 would enable this as well. But maybe you could solve it with a second procfile for now.

PS: link to your(?) stackoverflow post

andrewmcodes commented 5 years ago

@mukesh-zensar is this still an issue?