Steps to migrate production to Heroku
Required steps to migrate production to Heroku
staging
-
create aoz staging host on heroku (already exists) -
reset existing heroku staging db because it exeeded hobby-dev row limits and therefore blocked write credentials on all tables -
fix mailer setup bug for mailgun, with an email initializer that overwrites :smtp as mailer with :sendmail again -
seed the staging db with an amount of Volunteers, clients, assignments, group offers, group assignments, hours, etc. that restores ability to test new implementations and bugfixes on staging -
Change dns records for staging.aoz-freiwillige.ch -
upgrade heroku stack to latest heroku-20 - now it is 18 (in order to be able to test deployment and run time problems on staging) -
find solution to run wkhtmltopdf on heroku, it doesn't work out of the box #464 (closed) (possible solutions) -
deploy to staging with manually triggerable gitlab ci job
production step #1
-
which heroku postgres plan do we need - #465 (closed) Resolution: Hobby Basic for $9/Month -
create aoz production host on heroku - (https://dashboard.heroku.com/apps/production-aoz-freiwillige) -
presistent logs on heroku host (not fully fledged, but papertrail free plan gives us 7 days https://papertrailapp.com/, which is not perfect but not nothing) -
get s3 production storage set up on google cloud -
migrate (upload) current production pdf and image data to s3 bucket -
migrate staging and "classic hosting" productnion to google s3 -
test with current production database and files -
set up mailgun domain, because for production we probably cant use mg.panter.biz
because of the foreign sender -
deploy to heroku production with manually triggerable gitlab ci job
production step #2
-
Heroku Backup -
Change dns records for aoz-freiwillige.ch -
db backup solution for Heroku postgres, because AFAIK heroku does not supply such out of the box for free -
remove panter rails deploy gem, its dependencies and the config for it -
upgrade heroku-postgres hobby-dev to hobby-basic
Avoidable, but advised
-
upgrade rails to the latest version first -
implement gitlab CD deployment to heroku (manually triggerable)
Edited by Michael