Skip to content

Commit 2dfc362

Browse files
committed
allow the config file location to be specified in $SUPERVISOR_CONFIG
1 parent bfc88cc commit 2dfc362

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

docs/configuration.rst

+7-6
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ Configuration File
33

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

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

supervisor/options.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def __init__(self, require_configfile=True):
101101
self.attr_priorities = {}
102102
self.require_configfile = require_configfile
103103
self.add(None, None, "h", "help", self.help)
104-
self.add("configfile", None, "c:", "configuration=")
104+
self.add("configfile", None, "c:", "configuration=", env="SUPERVISOR_CONFIG")
105105

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

0 commit comments

Comments
 (0)