Skip to content

Commit

Permalink
seed Heroku review apps with a copy of the staging DB
Browse files Browse the repository at this point in the history
This trick was found in:

https://stackoverflow.com/a/36784098/179332

This should hopefully fix review apps.
  • Loading branch information
aspiers committed Jul 2, 2024

Verified

This commit was signed with the committer’s verified signature.
seperman Sep Dehpour
1 parent 96b3996 commit dc7c779
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -11,6 +11,12 @@
"success_url": "/",
"stack": "heroku-22",
"env": {
"HEROKU_APP_NAME": {
"required": true
},
"STAGING_DATABASE_URL": {
"required": true
},
"SERVER_HOST": {
"description": "Determine what cookie name to use. This can also be used to construct SERVER_HOST_PORT.",
"value": ""
@@ -114,6 +120,17 @@
"scripts": {
"test": "bundle exec rake test"
}
},
"review": {
"addons": [
{
"plan": "heroku-postgresql:essential-0",
"as": "DATABASE"
}
],
"scripts": {
"postdeploy": "pg_dump $STAGING_DATABASE_URL | psql $DATABASE_URL && bundle exec rake db:migrate"
}
}
}
}

0 comments on commit dc7c779

Please sign in to comment.