Reorder deployment options.
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Ron DuPlain · committed by Ron DuPlain · parent 7e4b705 · Browse files · 4 files·+40 added−39 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
4 files+40 added−39 removed
- other:+40 added−39 removed
Provenance
- Commit
976c957- Tree
5371781- Author
Ron DuPlain <ron.duplain@gmail.com>- Committer
Ron DuPlain <ron.duplain@gmail.com>- Parent
7e4b705
4 files changed+40 added−39 removed
modified:docs/deploying/fastcgi.rst+5 added-6 removed
1 unmodified line2 3 FastCGI4 =======5 6-FastCGI is a deployment option on servers like `nginx`_, `lighttpd`_,7-and `cherokee`_; see :ref:`deploying-uwsgi` and8-:ref:`deploying-other-servers` for other options. To use your WSGI9-application with any of them you will need a FastCGI server first. The10-most popular one is `flup`_ which we will use for this guide. Make sure11-to have it installed to follow along.6+FastCGI is a deployment option on servers like `nginx`_, `lighttpd`_, and7+`cherokee`_; see :ref:`deploying-uwsgi` and :ref:`deploying-wsgi-standalone`8+for other options. To use your WSGI application with any of them you will need9+a FastCGI server first. The most popular one is `flup`_ which we will use for10+this guide. Make sure to have it installed to follow along.11 12 .. admonition:: Watch Out13 14 Please make sure in advance that any ``app.run()`` calls you might149 unmodified linesmodified:docs/deploying/index.rst+3 added-3 removed
18 unmodified lines19 .. toctree::20 :maxdepth: 221 22 mod_wsgi23- cgi24- fastcgi23+ wsgi-standalone24 uwsgi26- others25+ fastcgi26+ cgimodified:docs/deploying/uwsgi.rst+4 added-5 removed
2 unmodified lines3 uWSGI4 =====5 6 uWSGI is a deployment option on servers like `nginx`_, `lighttpd`_, and7-`cherokee`_; see :ref:`deploying-fastcgi` and8-:ref:`deploying-other-servers` for other options. To use your WSGI9-application with uWSGI protocol you will need a uWSGI server10-first. uWSGI is both a protocol and an application server; the11-application server can serve uWSGI, FastCGI, and HTTP protocols.7+`cherokee`_; see :ref:`deploying-fastcgi` and :ref:`deploying-wsgi-standalone`8+for other options. To use your WSGI application with uWSGI protocol you will9+need a uWSGI server first. uWSGI is both a protocol and an application server;10+the application server can serve uWSGI, FastCGI, and HTTP protocols.11 12 The most popular uWSGI server is `uwsgi`_, which we will use for this13 guide. Make sure to have it installed to follow along.14 53 unmodified linesmodified:docs/deploying/wsgi-standalone.rst+28 added-25 removed
1-.. _deploying-other-servers:1+.. _deploying-wsgi-standalone:2 3-Other Servers4-=============3+Standalone WSGI Containers4+==========================5 6-There are popular servers written in Python that allow the execution of WSGI7-applications as well. These servers stand alone when they run; you can proxy8-to them from your web server.6+There are popular servers written in Python that contain WSGI applications and7+serve HTTP. These servers stand alone when they run; you can proxy to them8+from your web server. Note the section on :ref:`deploying-proxy-setups` if you9+run into issues.10 11+Gunicorn12+--------13+14+`Gunicorn`_ 'Green Unicorn' is a WSGI HTTP Server for UNIX. It's a pre-fork15+worker model ported from Ruby's Unicorn project. It supports both `eventlet`_16+and `greenlet`_. Running a Flask application on this server is quite simple::17+18+ gunicorn myproject:app19+20+`Gunicorn`_ provides many command-line options -- see ``gunicorn -h``.21+For example, to run a Flask application with 4 worker processes (``-w22+4``) binding to localhost port 4000 (``-b 127.0.0.1:4000``)::23+24+ gunicorn -w 4 -b 127.0.0.1:4000 myproject:app25+26+.. _Gunicorn: http://gunicorn.org/27+.. _eventlet: http://eventlet.net/28+.. _greenlet: http://codespeak.net/py/0.9.2/greenlet.html29+30 Tornado31 --------32 33 `Tornado`_ is an open source version of the scalable, non-blocking web34 server and tools that power `FriendFeed`_. Because it is non-blocking and35 uses epoll, it can handle thousands of simultaneous standing connections,36 which means it is ideal for real-time web services. Integrating this17-service with Flask is a trivial task::37+service with Flask is straightforward::38 39 from tornado.wsgi import WSGIContainer40 from tornado.httpserver import HTTPServer41 from tornado.ioloop import IOLoop23 unmodified lines65 .. _Gevent: http://www.gevent.org/66 .. _greenlet: http://codespeak.net/py/0.9.2/greenlet.html67 .. _libevent: http://monkey.org/~provos/libevent/68 49-Gunicorn50---------69+.. _deploying-proxy-setups:70 52-`Gunicorn`_ 'Green Unicorn' is a WSGI HTTP Server for UNIX. It's a pre-fork53-worker model ported from Ruby's Unicorn project. It supports both `eventlet`_54-and `greenlet`_. Running a Flask application on this server is quite simple::55-56- gunicorn myproject:app57-58-`Gunicorn`_ provides many command-line options -- see ``gunicorn -h``.59-For example, to run a Flask application with 4 worker processes (``-w60-4``) binding to localhost port 4000 (``-b 127.0.0.1:4000``)::61-62- gunicorn -w 4 -b 127.0.0.1:4000 myproject:app63-64-.. _Gunicorn: http://gunicorn.org/65-.. _eventlet: http://eventlet.net/66-.. _greenlet: http://codespeak.net/py/0.9.2/greenlet.html67-71 Proxy Setups72 ------------73 74 If you deploy your application using one of these servers behind an HTTP31 unmodified lines