rails/how-to/deploy_a_rails_app_to_heroku.md
View a list of new commits. View changed files.
git fetch staging
git log staging/main..main
git diff --stat staging/main
If necessary, add new environment variables.
heroku config:add NEW_VARIABLE=value --remote staging
Deploy to Heroku staging.
git push staging
If necessary, run migrations and restart the dynos.
heroku run rake db:migrate --remote staging
heroku restart --remote staging
Introspect to make sure everything's ok.
watch heroku ps --remote staging
Test the feature in browser.
Deploy to production.
git fetch production
git log production/main..main
git diff --stat production/main
heroku config:add NEW_VARIABLE=value --remote production
git push production
heroku run rake db:migrate --remote production
heroku restart --remote production
watch heroku ps --remote production
Watch logs and metrics dashboards.
Close pull request and comment Merged.
Procfile is set up to run Unicorn.