diff --git a/platypush/backend/http/__init__.py b/platypush/backend/http/__init__.py index e2fb28d9db..2e3cb39602 100644 --- a/platypush/backend/http/__init__.py +++ b/platypush/backend/http/__init__.py @@ -155,19 +155,20 @@ class HttpBackend(Backend): * **bcrypt** (``pip install bcrypt``) * **magic** (``pip install python-magic``), optional, for MIME type support if you want to enable media streaming - * **uwsgi** (``pip install uwsgi`` plus uwsgi server installed on your - system if required) - optional but recommended. By default the - Platypush web server will run in a process spawned on the fly by - the HTTP backend. However, being a Flask app, it will serve clients - in a single thread and won't support many features of a full-blown - web server. + * **gunicorn** (``pip install gunicorn``) - optional but recommended. - Base command to run the web server over uwsgi:: + By default the Platypush web server will run in a + process spawned on the fly by the HTTP backend. However, being a + Flask app, it will serve clients in a single thread and it won't + support many features of a full-blown web server. gunicorn allows + you to easily spawn the web server in a uWSGI wrapper, separate + from the main Platypush daemon, and the uWSGI layer can be easily + exposed over an nginx/lighttpd web server. - uwsgi --http :8008 --module platypush.backend.http.uwsgi --master --processes 4 --threads 4 + Command to run the web server over a gunicorn uWSGI wrapper:: + + gunicorn -w -b :8008 platypush.backend.http.uwsgi - Bear in mind that the main webapp is defined in ``platypush.backend.http.app:application`` - and the WSGI startup script is stored under ``platypush/backend/http/uwsgi.py``. """ _DEFAULT_HTTP_PORT = 8008 diff --git a/platypush/backend/http/manifest.yaml b/platypush/backend/http/manifest.yaml index 5215fbd337..a08655372e 100644 --- a/platypush/backend/http/manifest.yaml +++ b/platypush/backend/http/manifest.yaml @@ -5,5 +5,6 @@ manifest: - flask - bcrypt - python-magic + - gunicorn package: platypush.backend.http type: backend diff --git a/setup.py b/setup.py index a4c7dff46e..9bdaa65841 100755 --- a/setup.py +++ b/setup.py @@ -78,9 +78,7 @@ setup( # Support for Pushbullet backend and plugin 'pushbullet': ['pushbullet.py @ https://github.com/rbrcsk/pushbullet.py/tarball/master'], # Support for HTTP backend - 'http': ['flask', 'bcrypt', 'python-magic'], - # Support for uWSGI HTTP backend - 'uwsgi': ['flask', 'uwsgi', 'bcrypt', 'python-magic'], + 'http': ['flask', 'bcrypt', 'python-magic', 'gunicorn'], # Support for MQTT backends 'mqtt': ['paho-mqtt'], # Support for RSS feeds parser