Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Setup notes: Rails + React + Postgres on Heroku
- ```bash
- $ rails new <app name> --database=postgresql --webpack=react
- $ echo '.idea' >> .gitignore # remove RubyMine's config
- $ echo "ruby '2.4.0'" >> Gemfile # for Heroku Ruby version
- $ git add .
- $ git commit -m "Initial commit"
- # Create new repo on GitHub with same name...
- $ git remote add origin git@github.com:BrianSigafoos/<app name>.git
- $ git push -u origin master
- # Heroku setup
- $ heroku create
- $ git push heroku master
- # Heroku helpers
- $ heroku run rails console
- $ heroku run rake db:migrate # or any rake task
- # Use secrets.yml.enc - encoded secrets file committed to git
- $ bin/rails secrets:setup
- # save the encryption key (in git ignored secrets.yml) in a pw manager
- $ heroku config:set RAILS_MASTER_KEY=[encryption key]
- # check keys
- $ heroku config
- # push local branch to Heroku master
- $ git push heroku localbranch:master
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement