Skip to content

Instantly share code, notes, and snippets.

@bsphere
Last active December 10, 2015 22:28
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bsphere/4502175 to your computer and use it in GitHub Desktop.
Save bsphere/4502175 to your computer and use it in GitHub Desktop.
Upstart config for Node.js
#/etc/init/myapp.conf
description "MyApp Node.js"
author "xxx@myapp.com"
start on (local-filesystems and net-device-up IFACE=eth0)
stop on shutdown
respawn
respawn limit 5 60
script
cd /home/ubuntu/myapp
exec sudo -u ubuntu NODE_ENV=production /usr/bin/node /home/ubuntu/myapp/server.js >> /home/ubuntu/myapp/log/server.log 2>&1
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment