Creating wrolpi-api-dev service to run api in debug mode.

This commit is contained in:
Roland 2025-12-18 17:51:18 -07:00
parent 1ce8f499d8
commit 7e9e815bf6
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
3 changed files with 30 additions and 1 deletions

View file

@ -0,0 +1,19 @@
[Unit]
Description=WROLPi Python API (Development)
Wants=postgresql.service
PartOf=wrolpi.target
Conflicts=wrolpi-api.service
[Service]
Environment=PYTHONUNBUFFERED=1
ExecStart=/opt/wrolpi/venv/bin/python -m sanic main:api_app --host 0.0.0.0 --port 8081 -w 1 --reload --debug
ExecReload=/bin/kill -HUP $MAINPID
Group=wrolpi
User=wrolpi
WorkingDirectory=/opt/wrolpi/
Restart=on-failure
# Higher than the App so the API can start.
Nice=4
[Install]
WantedBy=default.target