Skip to content

Instantly share code, notes, and snippets.

@georgiybykov
Last active November 15, 2020 23:36
Show Gist options
  • Save georgiybykov/65dc44ab3be2a8a1354ab90b3e5d1793 to your computer and use it in GitHub Desktop.
Save georgiybykov/65dc44ab3be2a8a1354ab90b3e5d1793 to your computer and use it in GitHub Desktop.
Configurations for auto-deploy the Heroku Review Apps (includes `app.json` file)
# app.json
{
"name": "review-test-guru-app",
"description": "The application for creating and passing tests with ability to save questions to GitHub Gist.",
"repository": "https://github.com/georgiybykov/test-guru",
"scripts": {
"postdeploy": "pg_dump -Fc $DATABASE_URL | pg_restore --clean --no-owner -n public -d $DATABASE_URL && bundle exec rails db:migrate"
},
"env": {
"LANG": {
"required": true
},
"RACK_ENV": {
"required": true
},
"DATABASE_URL": {
"required": true
}
},
"addons": [
"heroku-postgresql:hobby-dev"
],
"buildpacks": [
{
"url": "heroku/ruby"
}
]
}
@georgiybykov
Copy link
Author

Also you should create Procfile in the root directory of the application with the information about the server configurations inside:

web: bundle exec puma -t 5:5 -p ${PORT:-5000} -e $RAILS_ENV

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment