Created
October 11, 2012 18:24
-
-
Save larsar/3874489 to your computer and use it in GitHub Desktop.
Heroku deployment workflow
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
Gjenskape produksjon: | |
Backup av staging og prod database: | |
heroku pgbackups:capture --remote staging | |
heroku pgbackups:capture --remote production | |
Clean staging-database: | |
heroku pg:reset DATABASE_URL --remote staging | |
Kopi av prod-data i staging: | |
heroku pgbackups:restore DATABASE `heroku pgbackups:url --remote production` --remote staging | |
Liste opp tagger: | |
git tag | |
Push produksjons-versjon (ved gitt tag) til staging: | |
git push -f staging v1.0-beta2^{}:master | |
heroku restart --remote staging | |
Staging skal nå være produksjonslik. | |
Oppgradering av staging: | |
git push staging master | |
heroku run rake db:migrate --remote staging | |
heroku restart --remote staging | |
Produksjonssetting: | |
git push production master | |
Migrering: | |
heroku run rake db:migrate --remote production | |
heroku restart --remote production | |
Tagg etter vellykket deployment: | |
git tag -a v1.0-beta2 -m "Version 1.0 Beta 2" | |
git push --tags | |
Revert tilbake til staging database: | |
heroku pg:reset DATABASE_URL --remote staging | |
heroku pgbackups:restore DATABASE `heroku pgbackups:url --remote staging` --remote staging | |
heroku restart --remote staging |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment