DarthSim / overmind

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

Feature request: set env var containing Procfile "process type" name #148

Closed martijnthe closed 4 months ago

martijnthe commented 1 year ago

Thanks a lot for creating overmind! I've been using it as a better version of heroku local.

One thing I've been missing is a way to determine from a child process what the "process type" was.

For example, given this Procfile:

web: bin/local/start-web.sh
worker: bin/local/start-worker.sh

heroku local sets a DYNO env var to web.1 in the web child process. Similary, foreman automatically sets a FOREMAN_WORKER_NAME env var.

Would it make sense to add this to overmind too? Perhaps a OVERMIND_WORKER_NAME variable?

Envek commented 4 months ago

Just for history: original foreman actually uses PS variable for this. See https://github.com/ddollar/foreman/pull/340

But node-foreman for some reason decided to use FOREMAN_WORKER_NAME (see https://github.com/strongloop/node-foreman/commit/d75ea2d07f5202ae598dd8d2f13fdcc0ff7ef3ca) 1 year later after foreman started to use PS. Weird.