DarthSim / overmind

Process manager for Procfile-based applications and tmux
MIT License
2.82k stars 79 forks source link

Allow for specifying processes to not run #93

Closed deecewan closed 4 years ago

deecewan commented 4 years ago

This is useful in the case where you want to not run one or two process, but keep the rest of the processes running as usual. Inverse of the OVERMIND_PROCESSES flag. Takes precedence over that flag.

My particular use case is building a react-native app, and needing to run/not run some of the processes per OS. One option is to maintain a list of every process, and add the necessary ones for each OS. The other is to turn off the unused/unwanted processes for each OS.

This is a more sustainable solution as I won't have to go in and update the master list every time the Procfile changes.

Closes #92

I have "tested" this by running the newly built binary against another project that uses overmind.

deecewan commented 4 years ago

I guess another way to do this would be in the more foreman style where I could specify OVERMIND_PROCESSES=service_a=1,service_b=0. If there are no numbers, it defaults to a 1. That would also prevent the need to have another flag, and would remove ambiguity around what happens when you specify the same process in both PROCESSES and IGNORE_PROCESSES.

deecewan commented 4 years ago

Actually, this can be done with the OVERMIND_FORMATION flag 👍 I didn't realise that flag existed because it's not in the README 😭

deecewan commented 4 years ago

Got some feedback that this might still be valuable as an easier way to prevent a process running 1-off, with a simple -x procname instead of having to do -m "all=1,procname=0". So, will ask @DarthSim to make a call on whether to add this or not.

DarthSim commented 4 years ago

Hey @deecewan! The feature is pretty simple and well implemented, so I have no reason not to merge this. LGTM. Thanks for your contribution!

matthutchinson commented 4 years ago

👏 I was just about to suggest adding something like this 👍