Skip to content

Instantly share code, notes, and snippets.

@RushOnline
Created April 28, 2013 14:24
Show Gist options
  • Save RushOnline/5477022 to your computer and use it in GitHub Desktop.
Save RushOnline/5477022 to your computer and use it in GitHub Desktop.
Run rails application under upstart control
description "MyApp @ Rails"
start on runlevel [2345]
stop on runlevel [!2345]
env APP_PATH="/var/www/apps/ecilop"
env APP_USER="deploy"
env APP_EXEC="rails server -e production"
# env APP_EXEC="rackup myapp.ru -s thin -E production"
# See at "rvm list" output
env APP_GEMS="1.9.3-p327"
respawn
exec su -c"cd $APP_PATH && ~$APP_USER/.rvm/bin/rvm $APP_GEMS exec $APP_EXEC" rush
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment