- Create app on Heroku and set up Git remote:
heroku create
- Push to Heroku:
git push heroku master
- Add any necessary environment variables
- Create db on Heroku:
heroku addons:create heroku-postgresql:hobby-dev
- Update knexfile.js with production config
- Push to Heroku, after you commit
- Create migrations (if necessary)
- Apply Migrations:
heroku run knex migrate:latest --env=production
- Create Seeds (if necessary)
- Apply Seeds:
heroku run knex seed:run --env=production
- Restart Heroku app:
heroku restart
- Set up remote on GitHub
- Push
- Sign up (if necessary)
- Add project repo
- Do a quick sanity check - add a new test, push to Github, ensure tests run on Travis
- Install travis command line tool (if necessary) -
gem install travis
- Set up the travis.yml file -
travis setup heroku
- Re push
- Magic