Skip to content

wrburgess/rails-api-template

Repository files navigation

App

Status

Dependency Status
Code Climate
Build Status

To Do

  1. Install Devise
  2. Install ActiveAdmin
  3. Install JSON responses

References

Initial Tasks

  1. Conduct a Search & Replace for all instances of "AppName" and "appname" and replace with your own application name.
  2. Change the database names in the config/database.yml file
  3. Change the app name in the config/initializers/session_store.rb file (if necessary)
  4. Rename the custom rake task for dev rebuild in lib/tasks/app.rake
  5. Edit the initial database migration file as appropriate at db/migrate
  6. Install figaro gem with rails generate figaro:install
  7. Run rake secret and add secret key to config/application.yml file for APP_SECRET_KEY_BASE
  8. Add deployment setting to config/application.yml file for RUN_MIGRATIONS: true
  9. Edit .gitignore as appropriate to hide secure variables
  10. Change the .travis.yml file for the db name
  11. Change the repo (staging/production) references in the lib/tasks/deploy.rake file
  12. Change the relevant account/repo settings in the lib/tasks/deploy.rake file

Create Staging Environment on Heroku

  1. Copy env file: cp config/environments/production.rb config/environments/staging.rb
  2. Set up git config: git config heroku.remote staging
  3. Set up env vars on Heroku: heroku config:set RACK_ENV=staging RAILS_ENV=staging

Set up Environment Variables on Heroku

  1. Push environment vars to heroku: rake figaro:heroku[app_name]

Custom Tasks

  • deploy to staging: rake deploy:staging
  • deploy to production: rake deploy:production
  • teardown/rebuild dev: rake app:rebuild
  • lint Travis setup: travis-lint
  • scan gems for security: hakiri gemfile:scan
  • scan code for quality: rubocop
  • scan code for security: brakeman

Example Env Config File

Create and place in the config/application.yml file

APP_SECRET_KEY_BASE: xxx
RUN_MIGRATIONS: true
DEPLOY_WITHOUT_SPECS: false

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages