Reworking how Sanic is run for upgraded Sanic version

This commit is contained in:
Roland 2026-01-22 18:55:12 -07:00
parent bdf5e0856f
commit 399b17ce4e
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
5 changed files with 15 additions and 0 deletions

View file

@ -6,6 +6,8 @@ Conflicts=wrolpi-api.service
[Service]
Environment=PYTHONUNBUFFERED=1
# Sanic 25.x wants 'spawn' but our code uses 'fork' for multiprocessing.
Environment=SANIC_START_METHOD_SET=1
ExecStart=/opt/wrolpi/venv/bin/python -m sanic main:api_app --host 0.0.0.0 --port 8081 -w 2 --reload --debug
ExecReload=/bin/kill -HUP $MAINPID
Group=wrolpi