...
Install heroku CLI on my Mac
Run
heroku login
to auth heroku CLI on my local machineCreate scihist-digicoll app in heroku dashboard
Provision
heroku postgres
add-on. For now we’re going to do ahobby-basic
at $9/month, although this won’t be enough for production, we plan astandard-0
at $50/month eventually. https://elements.heroku.com/addons/heroku-postgresqlImport database from our staging instance to our heroku db (https://devcenter.heroku.com/articles/heroku-postgres-import-export)
Do a new export on staging, since heroku asks for a certain format
Tricky cause
pg_dump
doesn’t live on staging jobs server! Need to figure out how to ssh to database server maybe… ok can find it in EC2 console, and ssh there asjrochkind
. Now need to figure out how to connect to database… can’t find database backup cronjob on database server, what user does it run under? not in ansible… but managed topg_dump
using credentials from local_env.yml on staging.Per heroku instructions, we need to put it on a private S3 bucket. We’ll use chf-hydra-backup, file
digcol-for-heroku.dump
. (Pretty slow to upload from my local network, figuring out how to put it in private bucket from the database server itself is beyond me right now though)Having trouble getting a properly signed URL to that location! hackily reverse engineered from S3 console, not the right way, but getting me there.
Succesfully imported!
heroku pg:psql -a scihist-digicoll
drops me into PSQL console where I can see tables and data to confirm. Deleted extra backup from our S3 bucket.
Try to deploy app to heroku?
add heroku remote to my local git, in local git directory:
heroku git:remote -a scihist-digicoll
, verify what it did withgit remote -v
git push heroku
Asset compilation failed, “TypeError: No value was provided for
app_url_base
“. We need that local_env config value for asset compilation apparently? (Based on stack trace, cause in order to boot the app, it tries to look it up to setconfig.action_mailer.default_url_options
. We could make that be okay if the value isn’t present…). Anyway, we can add the config var in heroku dashboard to our current heroku non-custom url,APP_URL_BASE=https://scihist-digicoll.herokuapp.com/
, and try again.Failed again cause it needs a local_env solr_url value. I can see this is going to be a slow process of discovering additional ones, as it takes a couple minutes to fail each time. But we’ll try adding a heroku config
SOLR_URL=http://localhost/dummy/nonexisting
“Lockbox master key is missing in production.” – there’s a lot of ENV we need just to get assets to compile! Try
LOCKBOX_MASTER_KEY=000000000000000000000000000000000000000000000000000000000000000
Mon Oct 5
Heroku has a LOT of docs, usually well-written. It is pretty well googled. Some heroku overview and getting started docs:
...