mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
add a note about django1.4 & wsgi
This commit is contained in:
parent
6603ec551a
commit
4ce57509a7
@ -197,6 +197,16 @@ redirect_stderr=True
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="logging">
|
||||
<h2><a class="toc-backref" href="#contents">Logging</a></h2>
|
||||
<p>Logging can be configured by using various flags detailed in the
|
||||
<a class="reference external" href="http://gunicorn.org/configure.html#logging">configuration documentation</a> or by creating a <a class="reference external" href="https://github.com/benoitc/gunicorn/blob/master/examples/logging.conf">logging configuration file</a>.
|
||||
Send the <tt class="docutils literal">USR1</tt> signal to rotate logs if you are using the logrotate
|
||||
utility:</p>
|
||||
<pre class="literal-block">
|
||||
kill -USR1 $(cat /var/run/gunicorn.pid)
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="toc">
|
||||
@ -211,6 +221,7 @@ redirect_stderr=True
|
||||
<li><a class="reference internal" href="#supervisor" id="id9">Supervisor</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#logging" id="id10">Logging</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -86,6 +86,12 @@ directory.</p>
|
||||
$ cd path/to/yourdjangoproject
|
||||
$ gunicorn_django --workers=2
|
||||
</pre>
|
||||
<div class="note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<p class="last">If you run Django 1.4 and superior, it's higly recommanded to
|
||||
simply run your application with the <a class="reference external" href="https://docs.djangoproject.com/en/1.4/howto/deployment/wsgi/">WSGI interface</a> using
|
||||
the <a class="reference internal" href="#gunicorn">gunicorn</a> command.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="gunicorn-paster">
|
||||
<h3><a class="toc-backref" href="#contents">gunicorn_paster</a></h3>
|
||||
|
||||
@ -36,7 +36,7 @@ Example with test app::
|
||||
$ cat test.py
|
||||
# -*- coding: utf-8 -
|
||||
#
|
||||
# This file is part of gunicorn released under the MIT license.
|
||||
# This file is part of gunicorn released under the MIT license.
|
||||
# See the NOTICE for more information.
|
||||
|
||||
def app(environ, start_response):
|
||||
@ -49,7 +49,7 @@ Example with test app::
|
||||
]
|
||||
start_response(status, response_headers)
|
||||
return iter([data])
|
||||
|
||||
|
||||
$ gunicorn --workers=2 test:app
|
||||
|
||||
gunicorn_django
|
||||
@ -68,6 +68,11 @@ Example with your Django project::
|
||||
$ cd path/to/yourdjangoproject
|
||||
$ gunicorn_django --workers=2
|
||||
|
||||
.. note:: If you run Django 1.4 and superior, it's higly recommanded to
|
||||
simply run your application with the `WSGI interface
|
||||
<https://docs.djangoproject.com/en/1.4/howto/deployment/wsgi/>`_ using
|
||||
the `gunicorn`_ command.
|
||||
|
||||
gunicorn_paster
|
||||
+++++++++++++++
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user