2019-09-06 18:46:35 +02:00
|
|
|
[Unit]
|
2019-12-12 20:07:06 +01:00
|
|
|
Description=NetBox WSGI Service
|
2022-04-25 15:48:39 +02:00
|
|
|
Documentation=https://docs.netbox.dev/
|
2019-09-06 18:46:35 +02:00
|
|
|
After=network-online.target
|
|
|
|
Wants=network-online.target
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=simple
|
|
|
|
|
2020-02-28 22:25:43 +01:00
|
|
|
User=netbox
|
|
|
|
Group=netbox
|
2019-12-12 20:07:06 +01:00
|
|
|
PIDFile=/var/tmp/netbox.pid
|
|
|
|
WorkingDirectory=/opt/netbox
|
2019-09-06 18:46:35 +02:00
|
|
|
|
2024-03-28 20:24:08 +01:00
|
|
|
# Remove the following line if using uWSGI instead of Gunicorn
|
2020-02-26 18:28:35 +01:00
|
|
|
ExecStart=/opt/netbox/venv/bin/gunicorn --pid /var/tmp/netbox.pid --pythonpath /opt/netbox/netbox --config /opt/netbox/gunicorn.py netbox.wsgi
|
2019-09-06 18:46:35 +02:00
|
|
|
|
2024-03-28 20:24:08 +01:00
|
|
|
# Uncomment the following line if using uWSGI instead of Gunicorn
|
|
|
|
#ExecStart=/opt/netbox/venv/bin/uwsgi --ini /opt/netbox/uwsgi.ini
|
|
|
|
|
2019-09-06 18:46:35 +02:00
|
|
|
Restart=on-failure
|
|
|
|
RestartSec=30
|
|
|
|
PrivateTmp=true
|
|
|
|
|
|
|
|
[Install]
|
2019-12-12 20:07:06 +01:00
|
|
|
WantedBy=multi-user.target
|