Last active
December 17, 2015 09:39
-
-
Save franciscomxs/5589177 to your computer and use it in GitHub Desktop.
Git Hooks
This file contains 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
#!/bin/sh | |
cd /home/user/app/ || exit | |
unset GIT_DIR | |
git reset --hard | |
git pull origin master -f | |
bundle install --gemfile "Gemfile" --path "bundle" --deployment --without development test | |
bundle exec rake db:migrate RAILS_ENV=production | |
bundle exec rake assets:precompile | |
touch tmp/restart.txt |
This file contains 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
#!/bin/sh | |
cd /home/user/app/ || exit | |
unset GIT_DIR | |
kill $(cat tmp/pids/unicorn.pid) | |
git reset —hard | |
git pull origin master -f | |
bundle install —gemfile “Gemfile” —path “bundle” —deployment —without development test | |
bundle exec rake db:migrate RAILS_ENV=production | |
bundle exec unicorn -c config/unicorn.rb -D -E production |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment