summarylogtreecommitdiffstats
path: root/netbox.service
diff options
context:
space:
mode:
Diffstat (limited to 'netbox.service')
-rw-r--r--netbox.service22
1 files changed, 22 insertions, 0 deletions
diff --git a/netbox.service b/netbox.service
new file mode 100644
index 00000000000..2314c468f8d
--- /dev/null
+++ b/netbox.service
@@ -0,0 +1,22 @@
+[Unit]
+Description=NetBox WSGI Service
+Documentation=https://netbox.readthedocs.io/en/stable/
+After=network-online.target
+Wants=network-online.target
+
+[Service]
+Type=simple
+
+User=netbox
+Group=netbox
+PIDFile=/run/netbox/netbox.pid
+WorkingDirectory=/opt/netbox
+
+ExecStart=/usr/bin/gunicorn --pid /run/netbox/netbox.pid --pythonpath /opt/netbox --config /etc/netbox/gunicorn.py netbox.wsgi
+
+Restart=on-failure
+RestartSec=30
+PrivateTmp=true
+
+[Install]
+WantedBy=multi-user.target