2021-11-01 16:42:52 -06:00
|
|
|
[Unit]
|
|
|
|
|
Description=WROLPi Python API
|
|
|
|
|
Wants=postgresql.service
|
|
|
|
|
PartOf=wrolpi.target
|
|
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
|
Environment=PYTHONUNBUFFERED=1
|
2024-11-02 15:14:02 -06:00
|
|
|
ExecStart=/opt/wrolpi/venv/bin/sanic main:api_app --host 0.0.0.0 --port 8081 -w 5
|
2024-06-12 16:36:56 -06:00
|
|
|
ExecReload=/bin/kill -HUP $MAINPID
|
2021-11-01 16:42:52 -06:00
|
|
|
Group=wrolpi
|
|
|
|
|
User=wrolpi
|
|
|
|
|
WorkingDirectory=/opt/wrolpi/
|
2024-06-12 16:36:56 -06:00
|
|
|
Restart=on-failure
|
2025-03-03 19:28:35 -07:00
|
|
|
# Higher than the App so the API can start.
|
|
|
|
|
Nice=4
|
2021-11-01 16:42:52 -06:00
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
|
WantedBy=default.target
|