Last active
May 4, 2018 15:58
-
-
Save joxz/17f8c95983c1b3df937df543c3e56078 to your computer and use it in GitHub Desktop.
Netbox using uWSGI and systemd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=NetBox IPAM/DCIM Tool | |
Documentation=http://netbox.readthedocs.io/en/stable/ | |
Requires=netbox.socket | |
After=syslog.target | |
[Service] | |
ExecStart=/usr/local/bin/uwsgi --ini /opt/netbox/uwsgi.ini | |
ExecReload=/bin/kill -1 $MAINPID | |
ExecStop=/bin/kill -2 $MAINPID | |
StandardInput=socket | |
StandardOutput=journal | |
StandardError=journal | |
User=www-data | |
Group=www-data | |
Restart=on-failure | |
WorkingDirectory=/opt/netbox/netbox | |
KillSignal=SIGQUIT | |
Type=notify | |
StandardError=syslog | |
NotifyAccess=all | |
DeviceAllow=/dev/null rw | |
DeviceAllow=/dev/urandom r | |
DeviceAllow=/dev/zero r | |
[Install] | |
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Socket for NetBox IPAM/DCIM Tool | |
[Socket] | |
ListenStream=127.0.0.1:8001 | |
SocketUser=www-data | |
SocketGroup=www-data | |
[Install] | |
WantedBy=sockets.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[uwsgi] | |
master=true | |
protocol=http | |
uid=www-data | |
gid=www-data | |
processes=2 | |
module=netbox.wsgi | |
chdir=/opt/netbox/netbox/ | |
static-map=/=/opt/netbox/netbox/static |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment