Trying to fully automate Heroku's Review Apps (beta) for an app. Heroku wants us to use db/seeds.rb
to seed the recently spun up instance's DB.
We don't have a db/seeds.rb
with this app. We'd like to set up a script to copy the existing DB from the current parent (staging) and use that as the DB for the new app under review.
This I can do manually:
heroku pg:copy myapp::DATABASE_URL DATABASE_URL --app myapp-pr-1384 --confirm myapp-pr-1384
But I can't get figure out how to get the app name that Heroku creates into the postdeploy script.
Anyone tried this and know how it might be automated?