Document how environment variables impact configuration

This commit is contained in:
Kevin Michel 2020-01-29 17:03:24 +01:00
parent c82996f791
commit a648f8a838

View File

@ -4,23 +4,35 @@
Configuration Overview
======================
Gunicorn pulls configuration information from three distinct places.
Gunicorn reads configuration information from five places.
The first place that Gunicorn will read configuration from is the framework
Gunicorn first reads environment variables for some
configuration :ref:`settings <settings>`.
Gunicorn will then read configuration from a framework
specific configuration file. Currently this only affects Paster applications.
The second source of configuration information is a configuration file that is
optionally specified on the command line. Anything specified in the Gunicorn
config file will override any framework specific settings.
The third source of configuration information is a configuration file that is
optionally specified using command line arguments. Anything specified in the
Gunicorn config file will override any framework specific settings.
The fourth place of configuration information are command line arguments
stored in an environment variable named ``GUNICORN_CMD_ARGS``.
Lastly, the command line arguments used to invoke Gunicorn are the final place
considered for configuration settings. If an option is specified on the command
line, this is the value that will be used.
When a configuration file is specified in the command line arguments and in the
``GUNICORN_CMD_ARGS`` environment variable, only the configuration
file specified on the command line is used.
Once again, in order of least to most authoritative:
1. Framework Settings
2. Configuration File
3. Command Line
1. Environment Variables
2. Framework Settings
3. Configuration File
4. ``GUNICORN_CMD_ARGS``
5. Command Line
.. note::