Deploying to Production
This post serves as a deploy catalog.
Push to Github:
- Pull the latest changes from master.
- Switch to production branch. Update that shit.
- Check logs and diffs for both branches. Sanity check.
git diff production..master
- Take note of features you’re merging.
git merge master
git push origin production
Push to staging:
- Check heroku for greens:
git push staging production:master && heroku run rake db:migrate -r staging && heroku restart -r staging
- Push your production branch to staging’s master branch. Migrate schema changes, if needed and restart the app.
- Login to staging and poke around the features you just merged.
- Check JS console for any weird errors.
Push to production:
git push production production:master && heroku run rake db:migrate -r production && heroku restart -r production
- Make sure your latest Heroku SHA release is the same as your production branch.
heroku releases -r production
- Creep on HoneyBadger for any extraordinary bombs.
- “Unknown column error” is a normal error.
Unix trick: Use
fc to edit and execute your latest shell command.