Skip to content

Instantly share code, notes, and snippets.

@zetc0de
Created October 24, 2018 07:49
Show Gist options
  • Save zetc0de/09cdc191ec3b98013445e7b47b0c32f2 to your computer and use it in GitHub Desktop.
Save zetc0de/09cdc191ec3b98013445e7b47b0c32f2 to your computer and use it in GitHub Desktop.
Deploy rails to staging
#!/bin/bash -e
cd ~/sinaurails
./script/puma.sh stop
git status
git pull origin develop
bundle install
RAILS_ENV=staging bundle exec rake db:migrate
RAILS_ENV=staging bundle exec rake assets:clobber
RAILS_ENV=staging bundle exec rake assets:precompile
# wget https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css -P public/assets/.
# s3cmd put --recursive --delete-removed /home/$USER_STAGING/sinaurails/public/assets s3://staging-binar-academy/
chmod +x script/puma.sh
# sudo systemctl restart redis
# sudo systemctl restart sidekiq
./script/puma.sh start
echo "staging aman"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment