Created
May 6, 2014 11:14
-
-
Save schkovich/56879658afd28e1a918d to your computer and use it in GitHub Desktop.
Upstart script to control nodejs application
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
# start when networking is up | |
start on net-device-up IFACE!=lo | |
# stop on shutting down the system | |
stop on runlevel [016] | |
# application environment | |
# staging and development instances should use override file to define environment | |
env NODE_ENV=production | |
# respawn the job up to 10 times within a 5 second period. | |
# If the job exceeds these values, it will be stopped and marked as failed. | |
respawn | |
respawn limit 10 5 | |
# ssl-cert group can read certificates | |
setuid www-data | |
setgid ssl-cert | |
# adjust the path to the nodejs application | |
exec /usr/bin/nodejs /home/vagrant/opt/app.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment