ti-powerbar/powerbar.service

19 lines
611 B
SYSTEMD
Raw Normal View History

2024-02-02 11:34:50 +00:00
[Unit]
Description=Powerbar daemon
After=network.target
[Service]
User=powerbar
Group=powerbar
Environment="VIRTUAL_ENV=/opt/powerbar/venv"
Environment="PATH=/opt/powerbar/venv/bin:/usr/local/bin:/usr/bin:/bin"
ExecStart=/opt/powerbar/venv/bin/gunicorn app:app \
-k geventwebsocket.gunicorn.workers.GeventWebSocketWorker \
--name powerbar --workers 1 \
--max-requests 400 --max-requests-jitter 50 \
--log-level=info --bind=0.0.0.0:5000
WorkingDirectory=/opt/powerbar/ti-powerbar
Restart=on-failure
[Install]
WantedBy=multi-user.target