From f96707d039f03c41fdeb0cc40cb435112a4b6657 Mon Sep 17 00:00:00 2001 From: Tessa Walsh Date: Thu, 17 Nov 2022 13:47:05 -0500 Subject: [PATCH] Add uwsgi virtualenv information (#770) --- docs/manual/usage.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/manual/usage.rst b/docs/manual/usage.rst index e700b659..c519dd87 100644 --- a/docs/manual/usage.rst +++ b/docs/manual/usage.rst @@ -206,6 +206,21 @@ pywb uses the gevent coroutine library, and the default app will support many co For larger scale production deployments, running with `uwsgi `_ server application is recommended. The ``uwsgi.ini`` script provided can be used to launch pywb with uwsgi. uwsgi can be scaled to multiple processes to support the necessary workload, and pywb must be run with the `Gevent Loop Engine `_. Nginx or Apache can be used as an additional frontend for uwsgi. +It is recommended to install uwsgi and its dependencies in a Python virtual environment (virtualenv). Consult the uwsgi documentation for `virtualenv support `_ for details on how to specify the virtualenv to uwsgi. + +Installation of uswgi in a virtualenv will avoid known issues with installing uwsgi in some Debian-based OSes with Python 3.9+. As an example, in Ubuntu 22.04 with Python 3.10, it is recommended to install uwsgi like so: :: + + sudo apt install -y python3-pip \ + python3-dev \ + build-essential \ + libssl-dev \ + libffi-dev \ + python3-setuptools \ + python3-venv + python3 -m venv pywbenv + source pywbenv/bin/activate + pip install wheel uwsgi pywb + Although uwsgi does not provide a way to specify command line, all command line options can alternatively be configured via ``config.yaml``. See :ref:`configuring-pywb` for more info on available configuration options. Docker Deployment