-
Notifications
You must be signed in to change notification settings - Fork 3
Heroku staging app setup
chinyakao edited this page Jun 2, 2022
·
1 revision
-
Create a new heroku dyno name staging
heroku create <appname-staging> --remote <staging>
-
Push master branch to remote git
git push <staging> master
Push other branch to remote git
git push -f <staging> <branch name>:master
-
Check a Postgres server
heroku pg:info --app <appname-staging>
If no Postgres server, add it
heroku addons:create heroku-postgresql --app <appname-staging>
-
Set ALL the config variables (following are just part of them)
heroku config:set BUNDLE_WITHOUT=development:test --app <appname-staging> heroku config:set RACK_ENV=production --app <appname-staging>
-
DB migration
heroku run rake db:migrate --app <appname-staging>
-
Restart & Open
heroku restart --app <appname-staging>
Open
heroku open --app <appname-staging>
-
Check staging app status
heroku ps --app <appname-staging>
- Do we need to add the
staging
ENV setting? - If delete the staging app, check that removing the
git remote -v
or not. If git remove didn't remove, we can use the same staging app name and same git remote. Or to change staging app name and the git remotegit remote rm <staging> git remote add <staging> https://git.heroku.com/<newappname-staging>.git git push <staging> master