Skip to content

Instantly share code, notes, and snippets.

@antoniocapelo
Created December 31, 2014 19:16
Show Gist options
  • Save antoniocapelo/6a82190b9d57764b5abe to your computer and use it in GitHub Desktop.
Save antoniocapelo/6a82190b9d57764b5abe to your computer and use it in GitHub Desktop.
task for nodeJS powered site
description "task for nodeJS powered site"
author "António Capelo - antonio.c.capelo@gmail.com"
# 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