From c82996f791a496e4c45fd7e9078047e46717acb2 Mon Sep 17 00:00:00 2001 From: Kevin Michel Date: Wed, 29 Jan 2020 17:01:27 +0100 Subject: [PATCH] Add documentation for the $PORT environment variable --- docs/source/settings.rst | 4 ++++ gunicorn/config.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/docs/source/settings.rst b/docs/source/settings.rst index 16d8961a..bf67bd25 100644 --- a/docs/source/settings.rst +++ b/docs/source/settings.rst @@ -1164,6 +1164,10 @@ Multiple addresses can be bound. ex.:: will bind the `test:app` application on localhost both on ipv6 and ipv4 interfaces. +If the ``PORT`` environment variable is defined, the default +is ``['0.0.0.0:$PORT']``. If it is not defined, the default +is ``['127.0.0.1:8000']``. + .. _backlog: backlog diff --git a/gunicorn/config.py b/gunicorn/config.py index 6c1d1777..d501db69 100644 --- a/gunicorn/config.py +++ b/gunicorn/config.py @@ -579,6 +579,10 @@ class Bind(Setting): will bind the `test:app` application on localhost both on ipv6 and ipv4 interfaces. + + If the ``PORT`` environment variable is defined, the default + is ``['0.0.0.0:$PORT']``. If it is not defined, the default + is ``['127.0.0.1:8000']``. """