Always use an external uWSGI server to run the web service.

Added `waitress` dependency. For performance and security reasons, it's
better to always run the Flask application inside of a uWSGI server.

`waitress` also makes things easier by avoiding to ask the user to
manually provide the external executable arguments, as it was the case
with `uwsgi` and `gunicorn`.
This commit is contained in:
Fabio Manganiello 2023-05-05 00:07:13 +02:00
parent 2c254e8eb9
commit 285f3941d9
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774
5 changed files with 40 additions and 109 deletions

View file

@ -60,25 +60,26 @@ setup(
"Development Status :: 4 - Beta",
],
install_requires=[
'alembic',
'bcrypt',
'croniter',
'flask',
'frozendict',
'marshmallow',
'marshmallow_dataclass',
'python-dateutil',
'python-magic',
'pyyaml',
'redis',
'requests',
'croniter',
'rsa',
'sqlalchemy',
'alembic',
'websockets',
'tz',
'waitress',
'websocket-client',
'websockets',
'wheel',
'zeroconf>=0.27.0',
'tz',
'python-dateutil',
'rsa',
'marshmallow',
'marshmallow_dataclass',
'frozendict',
'flask',
'bcrypt',
'python-magic',
],
extras_require={
# Support for thread custom name
@ -89,8 +90,9 @@ setup(
'pushbullet': [
'pushbullet.py @ https://github.com/rbrcsk/pushbullet.py/tarball/master'
],
# Support for HTTP backend over uWSGI
'http': ['gunicorn'],
# This is only kept for back-compatibility purposes, as all the
# dependencies of the HTTP webserver are now core dependencies.
'http': [],
# Support for MQTT backends
'mqtt': ['paho-mqtt'],
# Support for RSS feeds parser
@ -230,7 +232,7 @@ setup(
# Support for zigbee2mqtt
'zigbee': ['paho-mqtt'],
# Support for Z-Wave
'zwave': ['python-openzwave'],
'zwave': ['paho-mqtt'],
# Support for Mozilla DeepSpeech speech-to-text engine
'deepspeech': ['deepspeech', 'numpy', 'sounddevice'],
# Support for PicoVoice hotword detection engine