Created
December 31, 2014 19:16
-
-
Save antoniocapelo/6a82190b9d57764b5abe to your computer and use it in GitHub Desktop.
task for nodeJS powered site
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 "task for nodeJS powered site" | |
author "António Capelo - [email protected]" | |
# used to be: start on startup | |
# until we found some mounts weren't ready yet while booting: | |
start on started mountall | |
stop on shutdown | |
# Automatically Respawn: | |
respawn | |
respawn limit 99 5 | |
script | |
export HOME="/root" | |
export NODE_ENV="production" | |
chdir /my/nodejs/server/prod/dir | |
exec /usr/local/bin/npm start | |
end script | |
post-start script | |
# Put a script here that will notifiy you node has (re)started | |
# /root/bin/hoptoad.sh "node.js has started!" | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment