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