command
% brew tap heroku/brew && brew install heroku
Check version
% heroku --version
Installation is complete when the version is output
Official site: https://devcenter.heroku.com/articles/heroku-cli
% heroku login --interactive
Email:Enter each
password:Enter each
: information_desk_person: Login successful if the registered email address is displayed after Logged in as
Gemfile * Enter at the bottom
Gemfile
group :production do
gem 'rails_12factor'
end
: information_desk_person: Don't forget to bundle install and reboot
: information_desk_person: Commit if managed by Git
% heroku create [Application name]
% git config --list | grep heroku
: information_desk_person: At this time, if anything other than "fatal: not in a git directory" is output, the creation is complete!
% heroku addons:add cleardb
% heroku_cleardb=`heroku config:get CLEARDB_DATABASE_URL`
% heroku config:set DATABASE_URL=mysql2${heroku_cleardb:5}
: information_desk_person: URL "mysql2" changes depending on Gem usage ** After that, set environment variables to manage private values. ** **
% heroku apps:info
Reference: https://devcenter.heroku.com/articles/getting-started-with-rails6
Recommended Posts