Skip to content

Instantly share code, notes, and snippets.

@durran
Created December 1, 2011 14:03
Show Gist options
  • Save durran/1416943 to your computer and use it in GitHub Desktop.
Save durran/1416943 to your computer and use it in GitHub Desktop.
Post Receive Hook Rackspace (staging)
#!/bin/sh
sudo rm -rf /usr/local/rvm/gems/ruby-1.9.3-p0@application/cache/
set -e
cd ..
unset GIT_DIR
env -i git reset --hard
sudo /usr/local/rvm/bin/rvm 1.9.3@application exec bundle install
RAILS_ENV=staging RAILS_GROUPS=assets /usr/local/rvm/bin/rvm 1.9.3@application exec rake assets:precompile
/usr/local/rvm/bin/rvm 1.9.3@application exec rake db:seed
/etc/init.d/unicorn graceful-reload
/etc/init.d/resque stop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment