-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion: Allow a configuration file to be determined via ENVIRONMENT vars #742
Comments
This has been requested several times now. I was initially against it because locating the config file is already quite complicated, but I have come around. It's clear from other tickets that this would be useful for some situations. If a patch is submitted with tests, I will merge it. I agree with your suggested order. I think the |
For another use case, I'm in an environment where I do not have root privileges, and thus, everything gets installed locally in my home directory. Therefore, I cannot place my config file in any location that supervisor expects. Setting an environment variable would absolutely solve my problem and allow me to still use supervisor. The other solution would be to add any/all of the following to the search path (http://supervisord.org/configuration.html#configuration-file):
That ought to be an easy feature to add too. Thoughts? |
I'd be more inclined to just add something like |
Well how about just For what it's worth, looks like it's a single line addition: supervisor/supervisor/options.py Lines 107 to 113 in bba1c5c
|
My preference would be to stop growing the search list and just do something like the environment variable. You could set that in |
This is still on my queue, I just haven't had time work on a PR. @blaketmiller depending on your needs, you can just use a shell alias or edit a startup script to explicitly pass in the config file via |
I like the idea of having the config file in a user's home directory (as suggested by @blaketmiller), but I'd much rather use an XDG-conformant location (eg: As far as the default location goes; the issue with the current list of locations, is that none of them are user-writeable; all of them require root permissions, and are system-wide. Anyhow, I'm also okay with the |
I am willing to submit a PR for this if the idea is acceptable.
Currently the configuration file is determined by this logic:
-c
argumentI suggest the following change:
-c
argumentSUPERVISOR_CONFIG
environment variableThe text was updated successfully, but these errors were encountered: