Last active
December 17, 2015 17:09
-
-
Save cronnelly/5643792 to your computer and use it in GitHub Desktop.
Template Upstart script for Clock's Node.js applications, using nave.
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
author "Michael Cronnelly" | |
env NODE_ENV=testing | |
env NODE_START=/var/application/<site>/server.js | |
env NODE_VERSION=0.10.7 | |
env PORT=3310 | |
setuid node | |
env HOME=/home/node | |
start on (local-filesystems and net-device-up IFACE=eth0) | |
stop on shutdown | |
respawn # restart when job dies | |
respawn limit 5 60 # give up restart after 5 respawns in 60 seconds | |
exec /usr/local/bin/nave use $NODE_VERSION node $NODE_START |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is much better we should switch to this.