Skip to content

Instantly share code, notes, and snippets.

@spiermar
Created November 16, 2014 05:39
Show Gist options
  • Save spiermar/e361f6a9de62b812ccfa to your computer and use it in GitHub Desktop.
Save spiermar/e361f6a9de62b812ccfa to your computer and use it in GitHub Desktop.
Node.js Upstart Configuration
description "Node.JS Service"
author "Martin Spier"
env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
respawn
start on runlevel [23]
stop on shutdown
respawn limit 20 5
script
set -e
export NODE_ENV=production
export PORT=80
. /my/service/path/current/prod.env
exec nodejs /my/service/path/current/bin/www >> /var/log/nodeservice.log 2>&1
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment