Created
November 16, 2014 05:39
-
-
Save spiermar/e361f6a9de62b812ccfa to your computer and use it in GitHub Desktop.
Node.js Upstart Configuration
This file contains hidden or 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
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