mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-02 20:59:56 -05:00
20 lines
472 B
SYSTEMD
20 lines
472 B
SYSTEMD
|
|
[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
|