Consider an --except flag when running foreman start?
maxehmookau opened this issue · comments
Hi there,
With Heroku adding a release phase feature recently, we can now add a release
process that Heroku will run once on deploy. This, however, doesn't need to be run in development.
Obviously I'm aware that foreman isn't coupled to heroku's ecosystem (nor should it be) but would you consider the addition of an --except
flag so that we can run all processes with the exception of a list? i.e.
foreman start --except=release
Currently, adding a line such as this:
release: bundle exec rails db:migrate
Causes foreman to exit once the migration is complete. If this is a feature you're interested in, I'd be happy to write the patch for it but wanted to check I'm not missing existing functionality first or if it's something that you don't believe belongs in foreman.
Cheers
Foreman currently has the -m
flag (formation) where you can specify things like foo=0
. See comment on #635 as well.
What worked for me:
adding a line like formation: release=0,web=1,webpacker=1
to your .foreman
file will make sure your release task doesn't run and the other the processes do (in my case: web and webpacker ).
man pages: http://ddollar.github.io/foreman/
I still see value in --except
. I have a tool which does not know anything about the formation but I still want to be able to exclude certain processes. Or something like -m foo=0,*=1
would also work.
Try -m all=1,foo=0