Skip to content

Instantly share code, notes, and snippets.

@kirs
Created October 3, 2012 05:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kirs/3825306 to your computer and use it in GitHub Desktop.
Save kirs/3825306 to your computer and use it in GitHub Desktop.
Unicorn service for Runit
#!/bin/sh
exec 2>&1
export RAILS_ENV=production
APP_ROOT=/home/deploy/project_name
UNICORN="/usr/local/rvm/bin/rvm 1.9.2@project_name exec bundle exec unicorn_rails -c $APP_ROOT/current/config/unicorn.rb -E $RAILS_ENV"
cd $APP_ROOT/current
exec $UNICORN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment