Skip to content

Instantly share code, notes, and snippets.

@bartread
Created January 21, 2017 22:14
Show Gist options
  • Save bartread/e7395dd536eeca6668205fa1328d8a8d to your computer and use it in GitHub Desktop.
Save bartread/e7395dd536eeca6668205fa1328d8a8d to your computer and use it in GitHub Desktop.
systemd service descriptor for arcade.ly
[Unit]
Description=Arcade.ly Node.js Server
#Requires=After=mysql.service # Requires the mysql service to run first
[Service]
ExecStart=/usr/bin/node /home/ubuntu/arcade/build/production/index.js
Restart=always
RestartSec=10 # Restart service after 10 seconds if node service crashes
StandardOutput=syslog # Output to syslog
StandardError=syslog # Output to syslog
SyslogIdentifier=arcadely-nodejs-server
#User=<alternate user>
#Group=<alternate group>
#Environment=NODE_ENV=production PORT=1337
WorkingDirectory=/home/ubuntu/arcade/build/production
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment