diff options
author | Michael Merickel <michael@merickel.org> | 2020-07-14 22:22:16 -0500 |
---|---|---|
committer | Michael Merickel <michael@merickel.org> | 2020-07-14 22:24:28 -0500 |
commit | 7000a53bd2c4c56f1ae96696eddfab9474526a2f (patch) | |
tree | ae08c27dc09e5f9bd8cba54947862565ee45d493 | |
parent | 743844b0ed52ed3d830863a4aeac8b8d8f9254e6 (diff) | |
download | waitress-7000a53bd2c4c56f1ae96696eddfab9474526a2f.tar.gz |
Merge pull request #306 from cacao-accounting/py3-only
Update usage.rst to include reference Heroku
-rw-r--r-- | docs/usage.rst | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/usage.rst b/docs/usage.rst index 5d3309b..872c045 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -80,4 +80,23 @@ can be used in development and in situations where the likes of # Listen on only IPv4 on port 8041 waitress-serve --port=8041 myapp:wsgifunc +Waitress can be used to serve WSGI apps on Heroku, include waitress in your +requirements.txt file a update the Procfile as following: + +.. code-block:: bash + + web: waitress-serve \ + --listen "*:$PORT" \ + --trusted-proxy '*' \ + --trusted-proxy-headers 'x-forwarded-for x-forwarded-proto x-forwarded-port' \ + --log-untrusted-proxy-headers \ + --clear-untrusted-proxy-headers \ + --threads ${WEB_CONCURRENCY:-4} \ + myapp:wsgifunc + +Note that Waitress uses a thread-based model and careful effort should be taken to ensure +that requests do not take longer than 30 seconds or Heroku will inform the client that the +request failed even though the request is still being processed by waitress and occupying +a thread until it completes. + For more information on this, see :ref:`runner`. |