Skip to content
Myr

Merge pull request #3162 from chivalry/gunicorn-discovery-docs-update

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Update documentation on gunicorn deployment and app discovery

authored by David Lord · committed by GitHub · parents 00ca5b7, 0df2620 · Browse files · 2 files+12 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+12 added−6 removed

  • other:+12 added−6 removed

2 files+12 added−6 removed

modified:docs/deploying/wsgi-standalone.rst+9 added-3 removed
21 unmodified lines
224``) binding to localhost port 4000 (``-b 127.0.0.1:4000``)::2324 gunicorn -w 4 -b 127.0.0.1:4000 myproject:app2526.. _Gunicorn: http://gunicorn.org/27.. _eventlet: http://eventlet.net/28.. _greenlet: https://greenlet.readthedocs.io/en/latest/26The ``gunicorn`` command expects the names of your application module or27package and the application instance within the module. If you use the28application factory pattern, you can pass a call to that::2930 $ gunicorn "myproject:create_app()"3132.. _Gunicorn: https://gunicorn.org/33.. _eventlet: https://eventlet.net/343536uWSGI37--------3839`uWSGI`_ is a fast application server written in C. It is very configurable
117 unmodified lines
modified:docs/cli.rst+3 added-3 removed
66 unmodified lines
67``FLASK_APP="hello:create_app('dev')"``68 The ``create_app`` factory in ``hello`` is called with the string ``'dev'``69 as the argument.7071If ``FLASK_APP`` is not set, the command will look for a file called72:file:`wsgi.py` or :file:`app.py` and try to detect an application instance or73factory.71If ``FLASK_APP`` is not set, the command will try to import "app" or72"wsgi" (as a ".py" file, or package) and try to detect an application73instance or factory.7475Within the given import, the command looks for an application instance named76``app`` or ``application``, then any application instance. If no instance is77found, the command looks for a factory function named ``create_app`` or
389 unmodified lines