[RUBY] Heroku CLI operation (command)
** This is just a list of commands. Please note that it is not the order when deploying **
** Describe in gem file to deploy rails application to Heroku **
Gemfile
group :production do
gem 'rails_12factor'
end
- rails_12factor is used in the production environment instead of the development environment Gem, production is to be used in the production environment *
** Command list **
- Log in to heroku dt>
- heroku login --interactive
-
- Create an application to publish on Heroku dt>
- heroku create app name dd>
- Is the application reflected? dt>
- git config --list | grep heroku
- Create my sql on heroku (ClearDB add-on) dt>
- heroku addons:add cleardb
- When using Ruby on Rails, change to Gem corresponding to MySQL dt>
- heroku_cleardb=`heroku config:get CLEARDB_DATABASE_URL`
- Change to own mysql version (URL) dt>
- heroku config: set DATABASE_URL = [own mysql] $ {heroku_cleardb: 5} dd>
- When you want to decrypt credentials.yml.enc with master.key and check the contents dt>
- EDITOR="vi" bin/rails credentials:edit
- Setting environment variables on Heroku dt>
- heroku config:set RAILS_MASTER_KEY=`cat config/master.key`
- Show Heroku environment variable list dt>
- heroku config
- App reflected on heroku dt>
- git push heroku master
- Reflect migration on heroku dt>
- heroku run rails db:migrate
- * heroku run is used when you want to operate on heroku * dd>
- When you want to see the information of the application deployed on Heroku dt>
- heroku apps:info