Created
January 6, 2013 14:27
-
-
Save barrysteyn/4467515 to your computer and use it in GitHub Desktop.
Running a Node process under NVM that uses upstart.
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
start on runlevel [2345] | |
stop on runlevel [06] | |
setuid devuser #don't run the process as root. You are asking for trouble if you do | |
setgid devuser | |
env NODEFOLDER=/home/dev/node-script | |
script | |
chdir $NODEFOLDER | |
exec bash -c 'source /home/dev/nvm/nvm.sh && exec node app' | |
end script | |
start on startup | |
respawn |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment