Created
May 2, 2012 19:47
-
-
Save davidwood/2579713 to your computer and use it in GitHub Desktop.
Upstart script for node app
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
description "My awesome application daemon" | |
start on filesystem or runlevel [2345] | |
stop on shutdown | |
respawn | |
respawn limit 5 60 # Limit respawns to 5 failures in 60 seconds | |
env NODE_ENV=production | |
exec /usr/local/bin/node /path/to/application/app.js >> /path/to/application/logs/node.log 2>&1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This file is stored in
/etc/init/myapp.conf
. The application can be started withstart myapp
and stopped withstop myapp
(might needsudo
).