regenerate settings

This commit is contained in:
benoitc 2013-09-26 22:50:01 +02:00
parent 840f23ee80
commit 5ff75b194c

View File

@ -14,8 +14,7 @@ config
~~~~~~ ~~~~~~
* ``-c FILE, --config FILE`` * ``-c FILE, --config FILE``
* ``gunicorn.conf.py`` if the file exists on the current directory otherwise * ``None``
``None`` is used.
The path to a Gunicorn config file. The path to a Gunicorn config file.
@ -29,13 +28,20 @@ bind
~~~~ ~~~~
* ``-b ADDRESS, --bind ADDRESS`` * ``-b ADDRESS, --bind ADDRESS``
* ``127.0.0.1:8000`` * ``['127.0.0.1:8000']``
The socket to bind. The socket to bind.
A string of the form: 'HOST', 'HOST:PORT', 'unix:PATH'. An IP is a valid A string of the form: 'HOST', 'HOST:PORT', 'unix:PATH'. An IP is a valid
HOST. HOST.
Multiple addresses can be bound. ex.::
$ gunicorn -b 127.0.0.1:8000 -b [::1]:8000 test:app
will bind the `test:app` application on localhost both on ipv6
and ipv4 interfaces.
backlog backlog
~~~~~~~ ~~~~~~~
@ -74,9 +80,11 @@ worker_class
The type of workers to use. The type of workers to use.
The default class (sync) should handle most 'normal' types of workloads. The default class (sync) should handle most 'normal' types of
You'll want to read http://gunicorn.org/design.html for information on workloads. You'll want to read
when you might want to choose one of the other worker classes. http://docs.gunicorn.org/en/latest/design.html for information
on when you might want to choose one of the other worker
classes.
A string referring to one of the following bundled classes: A string referring to one of the following bundled classes:
@ -245,6 +253,14 @@ speed up server boot times. Although, if you defer application loading
to each worker process, you can reload your application code easily by to each worker process, you can reload your application code easily by
restarting workers. restarting workers.
chdir
~~~~~
* ``--chdir``
* ``/Users/benoitc/work/offset_pypy/src/gunicorn/docs``
Chdir to specified directory before apps loading.
daemon daemon
~~~~~~ ~~~~~~
@ -256,6 +272,26 @@ Daemonize the Gunicorn process.
Detaches the server from the controlling terminal and enters the Detaches the server from the controlling terminal and enters the
background. background.
Server Mechanic
---------------
raw_env
~~~~~~~
* ``-e ENV, --env ENV``
* ``[]``
Set environment variable (key=value).
Pass variables to the execution environment. Ex.::
$ gunicorn -b 127.0.0.1:8000 --env FOO=1 test:app
and test for the foo variable environement in your application.
Server Mechanics
----------------
pidfile pidfile
~~~~~~~ ~~~~~~~
@ -351,6 +387,10 @@ forwarded_allow_ips
Front-end's IPs from which allowed to handle X-Forwarded-* headers. Front-end's IPs from which allowed to handle X-Forwarded-* headers.
(comma separate). (comma separate).
Set to "*" to disable checking of Front-end IPs (useful for setups
where you don't know in advance the IP address of Front-end, but
you still trust the environment)
Logging Logging
------- -------
@ -368,7 +408,7 @@ access_log_format
~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
* ``--access-logformat STRING`` * ``--access-logformat STRING``
* ``"%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"`` * ``%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"``
The Access log format . The Access log format .
@ -444,6 +484,54 @@ The log config file to use.
Gunicorn uses the standard Python logging module's Configuration Gunicorn uses the standard Python logging module's Configuration
file format. file format.
syslog_addr
~~~~~~~~~~~
* ``--log-syslog-to SYSLOG_ADDR``
* ``unix:///var/run/syslog``
Address to send syslog messages
syslog
~~~~~~
* ``--log-syslog``
* ``False``
Log to syslog.
syslog_prefix
~~~~~~~~~~~~~
* ``--log-syslog-prefix SYSLOG_PREFIX``
* ``None``
makes gunicorn use the parameter as program-name in the syslog entries.
All entries will be prefixed by gunicorn.<prefix>. By default the program
name is the name of the process.
syslog_facility
~~~~~~~~~~~~~~~
* ``--log-syslog-facility SYSLOG_FACILITY``
* ``user``
Syslog facility name
enable_stdio_inheritance
~~~~~~~~~~~~~~~~~~~~~~~~
* ``-R, --enable-stdio-inheritance``
* ``False``
Enable stdio inheritance
Enable inheritance for stdio file descriptors in daemon mode.
Note: To disable the python stdout buffering, you can to set the user
environment variable ``PYTHONUNBUFFERED`` .
Process Naming Process Naming
-------------- --------------
@ -478,11 +566,13 @@ django_settings
* ``--settings STRING`` * ``--settings STRING``
* ``None`` * ``None``
The Python path to a Django settings module. The Python path to a Django settings module. (deprecated)
e.g. 'myproject.settings.main'. If this isn't provided, the e.g. 'myproject.settings.main'. If this isn't provided, the
DJANGO_SETTINGS_MODULE environment variable will be used. DJANGO_SETTINGS_MODULE environment variable will be used.
**DEPRECATED**: use the --env argument instead.
Server Mechanics Server Mechanics
---------------- ----------------
@ -492,11 +582,19 @@ pythonpath
* ``--pythonpath STRING`` * ``--pythonpath STRING``
* ``None`` * ``None``
A directory to add to the Python path for Django. A directory to add to the Python path.
e.g. e.g.
'/home/djangoprojects/myproject'. '/home/djangoprojects/myproject'.
paste
~~~~~
* ``--paster STRING``
* ``None``
Load a paste.deploy config file.
Server Hooks Server Hooks
------------ ------------
@ -563,7 +661,7 @@ The callable needs to accept two instance variables for the Arbiter and
new Worker. new Worker.
post_worker_init post_worker_init
~~~~~~~~~ ~~~~~~~~~~~~~~~~
* :: * ::
@ -605,7 +703,7 @@ post_request
* :: * ::
def post_request(worker, req, environ): def post_request(worker, req, environ, resp):
pass pass
Called after a worker processes the request. Called after a worker processes the request.
@ -626,6 +724,22 @@ Called just after a worker has been exited.
The callable needs to accept two instance variables for the Arbiter and The callable needs to accept two instance variables for the Arbiter and
the just-exited Worker. the just-exited Worker.
nworkers_changed
~~~~~~~~~~~~~~~~
* ::
def nworkers_changed(server, new_value, old_value):
pass
Called just after num_workers has been changed.
The callable needs to accept an instance variable of the Arbiter and
two integers of number of workers after and before change.
If the number of workers is set for the first time, old_value would be
None.
Server Mechanics Server Mechanics
---------------- ----------------
@ -659,3 +773,22 @@ proxy_allow_ips
Front-end's IPs from which allowed accept proxy requests (comma separate). Front-end's IPs from which allowed accept proxy requests (comma separate).
Ssl
---
keyfile
~~~~~~~
* ``--keyfile FILE``
* ``None``
SSL key file
certfile
~~~~~~~~
* ``--certfile FILE``
* ``None``
SSL certificate file