Skip to content

Instantly share code, notes, and snippets.

@lxbarth
Created January 24, 2012 23:21
Show Gist options
  • Save lxbarth/1673437 to your computer and use it in GitHub Desktop.
Save lxbarth/1673437 to your computer and use it in GitHub Desktop.
# upstart config
description "Generic node.js application"
author "Development Seed - http://developmentseed.org"
start on filesystem and net-device-up
stop on shutdown
respawn
script
cd /var/www/nodeapp
su -s /bin/sh -c 'NODE_ENV=production HOME=/var/www/nodeapp /usr/local/bin/node /var/www/nodeapp/index.js --config=/var/www/nodeapp/config.json >> /var/log/nodeapp/nodeapp.log 2>&1' nodeapp
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment