From cf55a9e807a35a67c226280d442add7eea199a8f Mon Sep 17 00:00:00 2001 From: Cyberes Date: Tue, 3 Sep 2024 17:18:23 -0600 Subject: [PATCH] use gunicorn --- feeder/requirements.txt | 3 ++- feeder/systemd/space-weather-server.service | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/feeder/requirements.txt b/feeder/requirements.txt index d976678..428b5e5 100644 --- a/feeder/requirements.txt +++ b/feeder/requirements.txt @@ -9,4 +9,5 @@ redis==5.0.8 async-timeout==4.0.3 Pillow flask==3.0.3 -schedule==1.2.2 \ No newline at end of file +schedule==1.2.2 +gunicorn==23.0.0 \ No newline at end of file diff --git a/feeder/systemd/space-weather-server.service b/feeder/systemd/space-weather-server.service index 4a19583..4a0e38f 100644 --- a/feeder/systemd/space-weather-server.service +++ b/feeder/systemd/space-weather-server.service @@ -6,7 +6,7 @@ After=network.target Type=simple User=homeassistant EnvironmentFile=/etc/secrets/space-weather -ExecStart=/srv/ha-noaa-space-weather/venv/bin/python /srv/ha-noaa-space-weather/feeder/server.py +ExecStart=/srv/ha-noaa-space-weather/venv/bin/gunicorn --workers 7 --bind 0.0.0.0:5000 server:app --access-logfile '-' --error-logfile '-' SyslogIdentifier=space-weather-server Restart=on-failure RestartSec=5s