New feature to allow the program environment to be loaded from an ext… #1431
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…ernal file or program.
pattern using a root-only file or a program that can provide environment
variables that a program should have. It can be set globally in the
supervisord section, or per program in a program section. The new
options are environment_file or environment_loader. They are optional,
and errors in one of them will prevent startup. They can be set in the
[supervisord] section and then will be passed down to the programs, or
in the program definitions. The file/loader is checked right before the
calls to spawn() in order to avoid problems with calling a subprocess
after the child fork, and to allow restarts to reload those environment
values.
From researching the history of things similar to this feature, I'm pretty sure the supervisor team will reject this and doesn't want it. But, it's a critical feature I need to move forward with supervisor. I've been a happy user for years now, but in needing to modernize some old stacks I need functionality like this. Lots of others agree, so hopefully this will be useful to them as well. I'll be running this fork for the foreseeable future and others are welcome to grab it and use it. Supervisor is pretty much feature complete for me so I'll only update it as necessary. The changes are pretty simple and easy to maintain, so hopefully this will be accepted. I did figure out how to add tests and run them with tox and they are all passing on both python 2.7 and 3.8.