From 3b853b04559dff359331a3b06755df935e09fafe Mon Sep 17 00:00:00 2001 From: Hasan Ramezani Date: Fri, 13 Jan 2017 12:38:52 +0330 Subject: [PATCH] Document GUNICORN_CMD_ARGS (#1425) --- docs/gunicorn_ext.py | 9 +++++++++ docs/source/run.rst | 3 +++ docs/source/settings.rst | 7 +++++++ 3 files changed, 19 insertions(+) diff --git a/docs/gunicorn_ext.py b/docs/gunicorn_ext.py index f2629c48..3350130e 100755 --- a/docs/gunicorn_ext.py +++ b/docs/gunicorn_ext.py @@ -18,6 +18,15 @@ able to be set from a configuration file. The setting name is what should be used in the configuration file. The command line arguments are listed as well for reference on setting at the command line. +.. note:: + + Settings can be specified by using environment variable + ``GUNICORN_CMD_ARGS``. All avaiable command line arguments can be used. + For example, to specify the bind address and number of workers:: + + $ GUNICORN_CMD_ARGS="--bind=127.0.0.1 --workers=3" gunicorn app:app + + .. versionadded:: 19.7 """ ISSUE_URI = 'https://github.com/benoitc/gunicorn/issues/%s' PULL_REQUEST_URI = 'https://github.com/benoitc/gunicorn/pull/%s' diff --git a/docs/source/run.rst b/docs/source/run.rst index 994ecad0..84636102 100644 --- a/docs/source/run.rst +++ b/docs/source/run.rst @@ -64,6 +64,9 @@ Commonly Used Arguments adjust the name of Gunicorn process as they appear in the process system table (which affects tools like ``ps`` and ``top``). +Settings can be specified by using environment variable +:ref:`GUNICORN_CMD_ARGS `. + See :ref:`configuration` and :ref:`settings` for detailed usage. .. _setproctitle: http://pypi.python.org/pypi/setproctitle/ diff --git a/docs/source/settings.rst b/docs/source/settings.rst index adfbb557..0c399a0c 100644 --- a/docs/source/settings.rst +++ b/docs/source/settings.rst @@ -10,6 +10,13 @@ able to be set from a configuration file. The setting name is what should be used in the configuration file. The command line arguments are listed as well for reference on setting at the command line. +.. note:: + + Settings can be specified by using environment variable + ``GUNICORN_CMD_ARGS``. All avaiable command line arguments can be used. + For example, to specify the bind address and number of workers:: + + $ GUNICORN_CMD_ARGS="--bind=127.0.0.1 --workers=3" gunicorn app:app Config File -----------