Consistent formatting and some addditions.

Ensures sphinx will generate consistent html headings. Some
addition of header text.
This commit is contained in:
Prateek Singh Paudel 2012-10-03 16:25:26 +05:45
parent 5e543bc3dd
commit 9eba21fb8e
9 changed files with 104 additions and 136 deletions

View File

@ -1,12 +1,8 @@
template: doc.html =========
title: Community Community
=========
_TOC_TOP_ Use these channels to communicate about the project.
.. contents::
:backlinks: top
_TOC_BOT_
Mailing list Mailing list
============ ============

View File

@ -1,16 +1,6 @@
template: doc.html ======================
title: Configure Configuration Overview
insert_settings: true ======================
_TOC_TOP_
.. contents::
:backlinks: top
_TOC_BOT_
Overview
--------
Gunicorn pulls configuration information from three distinct places. Gunicorn pulls configuration information from three distinct places.
@ -31,7 +21,7 @@ Once again, in order of least to most authoritative:
3. Command Line 3. Command Line
Framework Settings Framework Settings
------------------ ==================
Currently, only Paster applications have access to framework specific Currently, only Paster applications have access to framework specific
settings. If you have ideas for providing settings to WSGI applications or settings. If you have ideas for providing settings to WSGI applications or
@ -41,7 +31,7 @@ let us know.
.. _issue: http://github.com/benoitc/gunicorn/issues .. _issue: http://github.com/benoitc/gunicorn/issues
Paster Applications Paster Applications
+++++++++++++++++++ -------------------
In your INI file, you can specify to use Gunicorn as the server like such:: In your INI file, you can specify to use Gunicorn as the server like such::
@ -57,7 +47,7 @@ the base configuration. Remember that these will be overridden by the config
file and/or the command line. file and/or the command line.
Configuration File Configuration File
------------------ ==================
The configuration file should be a valid Python source file. It only needs to The configuration file should be a valid Python source file. It only needs to
be readable from the file system. More specifically, it does not need to be be readable from the file system. More specifically, it does not need to be
@ -85,7 +75,7 @@ number of processors::
return os.sysconf("SC_NPROCESSORS_ONLN") return os.sysconf("SC_NPROCESSORS_ONLN")
Command Line Command Line
------------ ============
If an option is specified on the command line, it overrides all other values If an option is specified on the command line, it overrides all other values
that may have been specified in the app specific settings, or in the optional that may have been specified in the app specific settings, or in the optional
@ -99,7 +89,7 @@ There is also a ``--version`` flag available to the command line scripts that
isn't mentioned in the list of settings. isn't mentioned in the list of settings.
Settings Settings
-------- ========
This is an exhaustive list of settings for Gunicorn. Some settings are only This is an exhaustive list of settings for Gunicorn. Some settings are only
able to be set from a configuration file. The setting name is what should be able to be set from a configuration file. The setting name is what should be

View File

@ -1,15 +1,11 @@
template: doc.html ==================
title: Deploy Deploying Gunicorn
==================
_TOC_TOP_ We strongly recommend to use Gunicorn behind a proxy server.
.. contents::
:backlinks: top
_TOC_BOT_
Nginx Configuration Nginx Configuration
------------------- ===================
Although there are many HTTP proxies available, we strongly advise that you Although there are many HTTP proxies available, we strongly advise that you
use Nginx_. If you choose another proxy server you need to make sure that it use Nginx_. If you choose another proxy server you need to make sure that it
@ -95,7 +91,7 @@ To turn off buffering, you only need to add ``proxy_buffering off;`` to your
... ...
Using Virtualenv Using Virtualenv
---------------- ================
To serve an app from a Virtualenv_ it is generally easiest to just install To serve an app from a Virtualenv_ it is generally easiest to just install
Gunicorn directly into the Virtualenv. This will create a set of Gunicorn Gunicorn directly into the Virtualenv. This will create a set of Gunicorn
@ -120,7 +116,7 @@ passing ``-I`` or ``--ignore-installed`` option to pip::
$ pip install -I gunicorn $ pip install -I gunicorn
Monitoring Monitoring
---------- ==========
.. note:: .. note::
Make sure that when using either of these service monitors you do not Make sure that when using either of these service monitors you do not
@ -130,7 +126,7 @@ Monitoring
confuses the monitor services. confuses the monitor services.
Circus Circus
++++++ ------
`Circus <http://circus.readthedocs.org/en/latest/index.html>`_ can be `Circus <http://circus.readthedocs.org/en/latest/index.html>`_ can be
used to monitor gunicorn. A simple configuration is:: used to monitor gunicorn. A simple configuration is::
@ -143,7 +139,7 @@ used to monitor gunicorn. A simple configuration is::
Then you can easily manage Gunicorn using the `circusctl <http://circus.readthedocs.org/en/latest/commands/#cli>`_ command. Then you can easily manage Gunicorn using the `circusctl <http://circus.readthedocs.org/en/latest/commands/#cli>`_ command.
Runit Runit
+++++ -----
A popular method for deploying Gunicorn is to have it monitored by runit_. A popular method for deploying Gunicorn is to have it monitored by runit_.
Here is an `example service`_ definition:: Here is an `example service`_ definition::
@ -169,9 +165,8 @@ as you create the symlink.
If it doesn't start automatically, run the script directly to troubleshoot. If it doesn't start automatically, run the script directly to troubleshoot.
Supervisor Supervisor
++++++++++ ----------
Another useful tool to monitor and control Gunicorn is Supervisor_. A Another useful tool to monitor and control Gunicorn is Supervisor_. A
`simple configuration`_ is:: `simple configuration`_ is::
@ -185,7 +180,7 @@ Another useful tool to monitor and control Gunicorn is Supervisor_. A
redirect_stderr=True redirect_stderr=True
Logging Logging
------- =======
Logging can be configured by using various flags detailed in the Logging can be configured by using various flags detailed in the
`configuration documentation`_ or by creating a `logging configuration file`_. `configuration documentation`_ or by creating a `logging configuration file`_.

View File

@ -1,12 +1,8 @@
template: doc.html ======
title: Design Design
======
_TOC_TOP_ A brief description of an architecture of Gunicorn.
.. contents::
:backlinks: top
_TOC_BOT_
Server Model Server Model
============ ============

View File

@ -1,13 +1,6 @@
template: doc.html ===
title: FAQ FAQ
===
_TOC_TOP_
.. contents::
:backlinks: top
_TOC_BOT_
WSGI Bits WSGI Bits
========= =========

View File

@ -1,22 +1,33 @@
.. Gunicorn documentation master file, created by ======================
sphinx-quickstart on Wed Oct 3 04:59:09 2012. Gunicorn - wsgi server
You can adapt this file completely to your liking, but it should at least ======================
contain the root `toctree` directive.
Welcome to Gunicorn's documentation! Gunicorn 'Green Unicorn' is a Python WSGI HTTP Server for UNIX. It's a pre-fork
==================================== worker model ported from Ruby's Unicorn project. The Gunicorn server is broadly
compatible with various web frameworks, simply implemented, light on server
resources, and fairly speedy.
Contents: Features
--------
* Natively supports WSGI, Django, and Paster
* Automatic worker process management
* Simple Python configuration
* Multiple worker configurations
* Various server hooks for extensibility
* Compatible with Python 2.x >= 2.5
Contents
========
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
install
run
configure
deploy
design
community
faq
news

View File

@ -1,22 +1,18 @@
template: doc.html ============
title: Install Installation
============
_TOC_TOP_ Follow the following steps to install Gunicorn.
.. contents::
:backlinks: top
_TOC_BOT_
Requirements Requirements
------------ ============
- **Python 2.x >= 2.5** (Python 3.x will be supported soon) - **Python 2.x >= 2.5** (Python 3.x will be supported soon)
- setuptools >= 0.6c6 - setuptools >= 0.6c6
- nosetests (for the test suite only) - nosetests (for the test suite only)
With easy_install With easy_install
----------------- =================
If you don't already have ``easy_install`` available you'll want to download If you don't already have ``easy_install`` available you'll want to download
and run the ``ez_setup.py`` script:: and run the ``ez_setup.py`` script::
@ -38,7 +34,7 @@ To install or upgrade to the latest released version of Gunicorn::
$ pip install -f http://github.com/tilgovi/gunicorn/tarball/py24 gunicorn $ pip install -f http://github.com/tilgovi/gunicorn/tarball/py24 gunicorn
From Source From Source
----------- ===========
You can install Gunicorn from source just as you would install any other You can install Gunicorn from source just as you would install any other
Python package. Gunicorn uses setuptools which will automatically fetch all Python package. Gunicorn uses setuptools which will automatically fetch all
@ -67,7 +63,7 @@ well as make changes to the source::
$ python setup.py develop $ python setup.py develop
Async Workers Async Workers
------------- =============
You may also want to install Eventlet_ or Gevent_ if you expect that your You may also want to install Eventlet_ or Gevent_ if you expect that your
application code may need to pause for extended periods of time during request application code may need to pause for extended periods of time during request
@ -92,7 +88,7 @@ want to consider one of the alternate worker types.
installed, this is the most likely reason. installed, this is the most likely reason.
Debian GNU/Linux Debian GNU/Linux
---------------- ================
If you are using Debian GNU/Linux and it is recommended that you use If you are using Debian GNU/Linux and it is recommended that you use
system packages to install Gunicorn except maybe when you want to use system packages to install Gunicorn except maybe when you want to use
@ -114,7 +110,7 @@ advantages:
entirely from the system in seconds. entirely from the system in seconds.
Stable ("squeeze") Stable ("squeeze")
++++++++++++++++++ ------------------
The version of Gunicorn in the Debian_ "stable" distribution is 0.10.0 (July The version of Gunicorn in the Debian_ "stable" distribution is 0.10.0 (July
2010). It is not recommended that you use this version. 2010). It is not recommended that you use this version.
@ -133,7 +129,7 @@ You can then install the latest version using::
$ sudo apt-get -t squeeze-backports install gunicorn $ sudo apt-get -t squeeze-backports install gunicorn
Testing ("wheezy") / Unstable ("sid") Testing ("wheezy") / Unstable ("sid")
+++++++++++++++++++++++++++++++++++++ -------------------------------------
"wheezy" and "sid" contain the latest released version of Gunicorn. You can "wheezy" and "sid" contain the latest released version of Gunicorn. You can
install it in the usual way:: install it in the usual way::
@ -142,7 +138,7 @@ install it in the usual way::
Ubuntu Ubuntu
------ ======
If you use Ubuntu_, you can update your system with packages from If you use Ubuntu_, you can update your system with packages from
our PPA_ by adding ``ppa:gunicorn/ppa`` to your system's Software our PPA_ by adding ``ppa:gunicorn/ppa`` to your system's Software
@ -160,14 +156,14 @@ and adding them to your system's software sources::
Replace 'lucid' with your Ubuntu distribution series. Replace 'lucid' with your Ubuntu distribution series.
Signing key Signing key
+++++++++++ -----------
:: ::
1024R/5370FF2A 1024R/5370FF2A
Fingerprint Fingerprint
+++++++++++ -----------
:: ::

View File

@ -1,12 +1,6 @@
template: doc.html =========
title: News Changelog
=========
_TOC_TOP_
.. contents::
:backlinks: top
_TOC_BOT_
0.14.6 / 2012-07-26 0.14.6 / 2012-07-26
------------------- -------------------

View File

@ -1,15 +1,12 @@
template: doc.html ================
title: Run Running Gunicorn
================
_TOC_TOP_ You can run Gunicorn by using commands or integrate with Django or Paster. For
deploying Gunicorn in production see :doc:`deploy`.
.. contents::
:backlinks: top
_TOC_BOT_
Commands Commands
-------- ========
After installing Gunicorn you will have access to three command line scripts After installing Gunicorn you will have access to three command line scripts
that can be used for serving the various supported web frameworks: that can be used for serving the various supported web frameworks:
@ -19,7 +16,7 @@ that can be used for serving the various supported web frameworks:
* ``gunicorn_paster`` * ``gunicorn_paster``
gunicorn gunicorn
++++++++ --------
The first and most basic script is used to serve 'bare' WSGI applications The first and most basic script is used to serve 'bare' WSGI applications
that don't require a translation layer. Basic usage:: that don't require a translation layer. Basic usage::
@ -53,7 +50,7 @@ Example with test app::
$ gunicorn --workers=2 test:app $ gunicorn --workers=2 test:app
gunicorn_django gunicorn_django
+++++++++++++++ ---------------
You might not have guessed it, but this script is used to serve Django You might not have guessed it, but this script is used to serve Django
applications. Basic usage:: applications. Basic usage::
@ -74,7 +71,7 @@ Example with your Django project::
the `gunicorn`_ command. the `gunicorn`_ command.
gunicorn_paster gunicorn_paster
+++++++++++++++ ---------------
Yeah, for Paster-compatible frameworks (Pylons, TurboGears 2, ...). We Yeah, for Paster-compatible frameworks (Pylons, TurboGears 2, ...). We
apologize for the lack of script name creativity. And some usage:: apologize for the lack of script name creativity. And some usage::
@ -87,14 +84,14 @@ Simple example::
$ gunicorn_paste --workers=2 development.ini $ gunicorn_paste --workers=2 development.ini
Integration Integration
----------- ===========
Alternatively, we also provide integration for both Django and Paster Alternatively, we also provide integration for both Django and Paster
applications in case your deployment strategy would be better served by such applications in case your deployment strategy would be better served by such
invocation styles. invocation styles.
Django ./manage.py Django ./manage.py
++++++++++++++++++ ------------------
You can add a ``run_gunicorn`` command to your ``./manage.py`` simply by adding You can add a ``run_gunicorn`` command to your ``./manage.py`` simply by adding
gunicorn to your ``INSTALLED_APPS``:: gunicorn to your ``INSTALLED_APPS``::
@ -109,7 +106,7 @@ Then you can run::
python manage.py run_gunicorn python manage.py run_gunicorn
paster serve paster serve
++++++++++++ ------------
If you're wanting to keep on keeping on with the usual paster serve command, If you're wanting to keep on keeping on with the usual paster serve command,
you can specify the Gunicorn server settings in your configuration file:: you can specify the Gunicorn server settings in your configuration file::