Skip to content

Commit

Permalink
allow the config file location to be specified in $SUPERVISOR_CONFIG
Browse files Browse the repository at this point in the history
  • Loading branch information
luto committed Apr 9, 2017
1 parent bfc88cc commit 2dfc362
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ Configuration File

The Supervisor configuration file is conventionally named
:file:`supervisord.conf`. It is used by both :program:`supervisord`
and :program:`supervisorctl`. If either application is started
without the ``-c`` option (the option which is used to tell the
application the configuration filename explicitly), the application
will look for a file named :file:`supervisord.conf` within the
following locations, in the specified order. It will use the first
file it finds.
and :program:`supervisorctl`. Either application can be starting with
the ``-c`` or ``--configuration`` option, which is used to tell the
application the configuration filename explicitly. Alternatively the
config file can be specified in the ``$SUPERVISOR_CONFIG`` environment
variable. If neither is he application will look for a file named
:file:`supervisord.conf` within the following locations, in the
specified order. It will use the first file it finds.

#. :file:`$CWD/supervisord.conf`

Expand Down
2 changes: 1 addition & 1 deletion supervisor/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def __init__(self, require_configfile=True):
self.attr_priorities = {}
self.require_configfile = require_configfile
self.add(None, None, "h", "help", self.help)
self.add("configfile", None, "c:", "configuration=")
self.add("configfile", None, "c:", "configuration=", env="SUPERVISOR_CONFIG")

here = os.path.dirname(os.path.dirname(sys.argv[0]))
searchpaths = [os.path.join(here, 'etc', 'supervisord.conf'),
Expand Down

0 comments on commit 2dfc362

Please sign in to comment.