C83 / THP_2.0

0 stars 0 forks source link

Deployment pipeline in Heroku #8

Closed C83 closed 6 years ago

C83 commented 6 years ago

Why ?

A fully automated deployment process will ensure that nobody ever push the wrong branch in deployment and will ensure that what is on Heroku is always up to date. It will also give us a staging env identical to production where we can test our feature one last time before updating the production (the only env clients see).

Must have:

Each should have:

Important: Do not configure your term to be able to talk to heroku.

Todo

Reading list

C83 commented 6 years ago

.ruby-version and .ruby-gemset

Change the version of ruby in Gemfile. App will read the version in a file : File.read('./.ruby-version') To create the .ruby-version and .ruby-gemset files : https://rvm.io/workflow/projects rvm --ruby-version use 2.5.1@course_api

Procfile :

Create a new file called Procfile Run puma server : web: bundle exec puma -t 5:5 -p ${PORT:-3000} -e ${RACK_ENV:-development} Add migration : release: rails db:migrate

C83 commented 6 years ago

Master changed yesterday. Staging app updated automatically. Migrate done automatically with the Procfile. I create a new lesson on the app. I promoted on the production app.