mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Honor $PORT environment variable.
This commit is contained in:
parent
6f726e0ec9
commit
402f003ca2
@ -319,7 +319,12 @@ class Bind(Setting):
|
|||||||
cli = ["-b", "--bind"]
|
cli = ["-b", "--bind"]
|
||||||
meta = "ADDRESS"
|
meta = "ADDRESS"
|
||||||
validator = validate_string
|
validator = validate_string
|
||||||
default = "127.0.0.1:8000"
|
|
||||||
|
if 'PORT' in os.environ:
|
||||||
|
default = '0.0.0.0:{0}'.format(os.environ.get('PORT'))
|
||||||
|
else:
|
||||||
|
default = '127.0.0.1:8000'
|
||||||
|
|
||||||
desc = """\
|
desc = """\
|
||||||
The socket to bind.
|
The socket to bind.
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user