DarthSim / overmind

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

Option to disable .env entirely #42

Closed piotrb closed 5 years ago

piotrb commented 5 years ago

Ruby's dotenv gem already takes care of loading env files in the correct order, and it supports layering based on environment and whatnot.

Similar to https://github.com/DarthSim/overmind/issues/35 which solution might work, but if you use multiple layers of .local files .. like .env.development.local and such it gets cumbersome to deal with it. overmind loading ANY of the env files causes the ruby dotenv to prefer the already set ENV from outside (ie from overmind) so it ends up overriding the local configs in annoying ways.

What I'd like actually is just a way to TURN OFF loading of all the generic .env files (perhaps permit loading of .env.overmind just to allow that to perhaps set the env variable that turns off any further .env loading.

piotrb commented 5 years ago

ok so using .overmind.env to set OVERMIND_ENV works fairly well as a workaround, it just doesn't really deal with layering very well, so I'd love to just be able to disable ovemind's env handing instead ;)

piotrb commented 5 years ago

The other issue this would solve .. right now restarting a process doesn't seem to reload the env for it .. by having the process manage its own .env it would allow it to properly reload the environment on restart .. right now overmind restart x is not as useful in some cases

DarthSim commented 5 years ago

right now restarting a process doesn't seem to reload the env for it

It isn't supposed to. It's pretty unexpected behavior and it's quite hard to implement.