@@ -1442,6 +1442,63 @@ nginx configuration below.
14421442If you are customizing a docker continer to use gunicorn, see
14431443https://pythonspeed.com/articles/gunicorn-in-docker/.
14441444
1445+ .. index:: pair: web interface; Waitress
1446+ single: wsgi; Waitress
1447+
1448+ Waitress Installation
1449+ ~~~~~~~~~~~~~~~~~~~~~
1450+
1451+ Waitress is a pure Python WSGI server. It runs on Windows and you
1452+ could use IIS or other web server to reverse proxy HTTP to it.
1453+
1454+ You can use Waitress to serve Roundup without a proxy. It's not
1455+ recommended, but it can be used on a local network where roundup can't
1456+ be accessed from the internet.
1457+
1458+ Assuming you have installed Roundup in a virtual environment (venv),
1459+ install ``waitress`` and ``paste`` into the same venv using
1460+ pip. ``paste`` is optional, but it provides logging middleware that
1461+ produces standard combined format HTTP connection logs. You need to
1462+ modify the file wsgi.py (obtained from ``frontends/wsgi.py``) to
1463+ invoke waitress. It will look like::
1464+
1465+ # If you installed roundup to the system locations
1466+ # using pip you don't need to change this
1467+ # section. If you installed roundup in a custom
1468+ # location, uncomment these lines and change the
1469+ # path in the append() method to your custom path.
1470+ #import sys
1471+ #sys.path.append('/custom/location/where/roundup/is/installed')
1472+
1473+ # Obtain the WSGI request dispatcher
1474+ from roundup.cgi.wsgi_handler import RequestDispatcher
1475+
1476+ # Set the path to tracker home.
1477+ tracker_home = 'demo'
1478+
1479+ # Definition signature for app: app(environ, start_response):
1480+ # If using apache mod_wsgi change app to application.
1481+ app = RequestDispatcher(tracker_home)
1482+
1483+ from waitress import serve
1484+ # Optional replaced TransLogger(app) with app if not installed
1485+ from paste.translogger import TransLogger
1486+ serve(TransLogger(app),
1487+ host='0.0.0.0',
1488+ port=8917,
1489+ url_prefix=f"/{tracker_home}/")
1490+
1491+ This will make Roundup available to any host on your local network at
1492+ port 8917 under the ``/demo/`` path. Run it with ``python wsgi.py``.
1493+ If you want to run just on the local loopback interface, replace
1494+ ``0.0.0.0`` with ``127.0.0.1``
1495+
1496+ `See the Waitress docs`_ for more info on configuring waitress
1497+ including putting it behind a proxy, IPV6 support etc.
1498+
1499+ .. _`See the Waitress docs`:
1500+ https://docs.pylonsproject.org/projects/waitress/en/stable/
1501+
14451502.. index:: pair: web interface; uWSGI
14461503 single: wsgi; uWSGI
14471504
0 commit comments