example systemd service

This commit is contained in:
AJ ONeal 2015-12-30 21:53:38 +00:00
parent 967a4a99fc
commit 6cc9ec30f7
1 changed files with 17 additions and 0 deletions

17
etc/holepunch.service Normal file
View File

@ -0,0 +1,17 @@
# https://www.digitalocean.com/community/tutorials/how-to-deploy-node-js-applications-using-systemd-and-nginx
# goes in /etc/systemd/system/holepunch.service
# systemctl enable holepunch
# systemctl start holepunch
[Service]
ExecStart=/usr/local/bin/node /srv/holepunch/bin/service.js
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=node-holepunch
User=root
Group=root
Environment=NODE_ENV=production
[Install]
WantedBy=multi-user.target