Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@cbartlett
Created February 28, 2019 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cbartlett/febf16c323d57c54487f11ad636bb1ee to your computer and use it in GitHub Desktop.
Save cbartlett/febf16c323d57c54487f11ad636bb1ee to your computer and use it in GitHub Desktop.
dumping a database in review apps
{
"name": "some_app_name",
"scripts": {
"postdeploy": "[ \"$RAILS_ENV\" != \"TEST\" ] && pg_dump $PRODUCTION_DATABASE_URL | psql $DATABASE_URL && bundle exec rake db:migrate"
},
"env": {
"PRODUCTION_DATABASE_URL": { "required": true },
"SOME_VAR": { "required": true },
"RELEASE_STAGE": "review",
},
"formation": {
"web": {
"quantity": 1
}
},
"addons": [
"heroku-postgresql",
"heroku-redis",
"whatever-add-on",
],
"buildpacks": [
{
"url": "heroku/ruby"
}
],
"environments": {
"test": {
"env": {
"BASE_URL": "http://localhost:3000"
},
"scripts": {
"test": "bundle exec rake spec"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment