Skip to content

Instantly share code, notes, and snippets.

@pftg
Created July 18, 2018 14:57
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 pftg/70927b1ab4c14e0925d024a806b027bb to your computer and use it in GitHub Desktop.
Save pftg/70927b1ab4c14e0925d024a806b027bb to your computer and use it in GitHub Desktop.
Heroku Review Setup for Ruby on Rails 5
{
"name": "rails-web-application-on-heroku",
"env": {
"RAILS_ENV": "staging",
"RACK_ENV": "staging",
"NODE_ENV": "production",
"BUNDLE_WITHOUT": "production:development:test",
"DB_SEED_ON_REDEPLOY": {
"description": "Reset database on redeploy",
"value": "true"
},
"RAILS_MAX_THREADS": "5",
"WEB_CONCURRENCY": "2",
"HEROKU_APP_NAME": {
"required": true
},
"RAILS_LOG_TO_STDOUT": {
"required": true
},
"RAILS_SERVE_STATIC_FILES": {
"required": true
}
},
"addons": [
"heroku-postgresql:hobby-dev",
"memcachier:dev"
],
"buildpacks": [
{
"url": "heroku/ruby"
}
]
}
#!/usr/bin/env bash
echo "== Preparing database =="
bin/rails db:migrate
# Reset database for testing purpose on staging
if [ "$DB_SEED_ON_REDEPLOY" = "true" ]; then
echo "Seeding ..."
bin/rails db:seed
echo "Seeding has been done!"
fi
release: bin/heroku-release
web: bundle exec puma -C config/puma.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment