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
Log in to heroku
heroku login --interactive
Create an application to publish on Heroku
heroku create app name
Is the application reflected?
git config --list | grep heroku
Create my sql on heroku (ClearDB add-on)
heroku addons:add cleardb
When using Ruby on Rails, change to Gem corresponding to MySQL
heroku_cleardb=`heroku config:get CLEARDB_DATABASE_URL`
Change to own mysql version (URL)
heroku config: set DATABASE_URL = [own mysql] $ {heroku_cleardb: 5}
When you want to decrypt credentials.yml.enc with master.key and check the contents
EDITOR="vi" bin/rails credentials:edit
Setting environment variables on Heroku
heroku config:set RAILS_MASTER_KEY=`cat config/master.key`
Show Heroku environment variable list
heroku config
App reflected on heroku
git push heroku master
Reflect migration on heroku
heroku run rails db:migrate
 
* heroku run is used when you want to operate on heroku *
When you want to see the information of the application deployed on Heroku
heroku apps:info

Recommended Posts

Heroku CLI operation (command)
Heroku command summary
Starting heroku through heroku CLI (for beginners)
Error when trying to use heroku command