Skip to content

Instantly share code, notes, and snippets.

@cronnelly
Last active December 17, 2015 17:09
Show Gist options
  • Save cronnelly/5643792 to your computer and use it in GitHub Desktop.
Save cronnelly/5643792 to your computer and use it in GitHub Desktop.
Template Upstart script for Clock's Node.js applications, using nave.
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
@serby
Copy link

serby commented May 24, 2013

This is much better we should switch to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment