use gunicorn

This commit is contained in:
Cyberes 2024-09-03 17:18:23 -06:00
parent 365c73e16b
commit cf55a9e807
2 changed files with 3 additions and 2 deletions

View File

@ -10,3 +10,4 @@ async-timeout==4.0.3
Pillow Pillow
flask==3.0.3 flask==3.0.3
schedule==1.2.2 schedule==1.2.2
gunicorn==23.0.0

View File

@ -6,7 +6,7 @@ After=network.target
Type=simple Type=simple
User=homeassistant User=homeassistant
EnvironmentFile=/etc/secrets/space-weather 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 SyslogIdentifier=space-weather-server
Restart=on-failure Restart=on-failure
RestartSec=5s RestartSec=5s