Steps to deploy to Heroku

Steps to deploy to Heroku

Terminal


brew tap heroku/brew && brew install heroku

Terminal


heroku --version

Terminal


#Command to log in to Heroku
% heroku login --interactive
  => Enter your Heroku credentials.
#Enter your email address and press enter
  => Email:
#Enter your password and press enter
  => Password:

Gemfile


#Add to the bottom line of the file
group :production do
  gem 'rails_12factor'
end

Terminal


#Install Gem
% bundle install

Terminal


% git add .
% git commit -m "gem rails_Addition of 12 factors"

Terminal


%heroku create application name

Terminal


% git config --list | grep heroku

Terminal


% heroku addons:add cleardb
Creating cleardb on ⬢ Application name... free
Created cleardb-vertical-00000 as CLEARDB_DATABASE_URL
Use heroku addons:docs cleardb to view documentation

Terminal


% heroku_cleardb=`heroku config:get CLEARDB_DATABASE_URL`

Terminal


% heroku config:set DATABASE_URL=mysql2${heroku_cleardb:5}

#Below, the command execution result
Setting DATABASE_URL and restarting ⬢ Application name... done, v◯◯
DATABASE_URL: mysql2://000000000000:[email protected]/heroku_aaa00000000?reconnect=true

Terminal


% EDITOR="vi" bin/rails credentials:edit

Terminal


% heroku config:set RAILS_MASTER_KEY=`cat config/master.key`

Terminal


% heroku config

Terminal


% git push heroku master

Terminal


% heroku run rails db:migrate

Confirm release

Terminal


% heroku apps:info

===ajax-app-123456
Addons:         cleardb:ignite
Auto Cert Mgmt: false
Dynos:          web: 1
Git URL:        https://git.heroku.com/Application name.git
Owner:          [email protected]
Region:         us
Repo Size:      165 KB
Slug Size:      56 MB
Stack:          heroku-18
Web URL:        https:/Application name.herokuapp.com/

That's all from the scene!

Recommended Posts

Steps to deploy to Heroku
Steps to deploy Struts 2.5.8
Deploy Vapor Project to Heroku
How to deploy on heroku
heroku deploy
Deploy Rails on Docker to heroku
How to deploy
heroku: docker: deploy
Deploy to heroku with Docker (Rails 6, MySQL)
Deploy to Heroku [Ruby on Rails] Beginner
Deploy to Heroku (for second and subsequent edits)
Can't upload to heroku
How to deploy to Heroku from a local docker image
How to check CircleCI code and automatically deploy to Heroku
Deploy your application to WildFly
Deploy Spring Boot applications to Heroku without using the Heroku CLI
How to deploy a simple Java Servlet app on Heroku
Deploy the application created by Spring Boot to Heroku (public) ②
Deploy the application created by Spring Boot to Heroku (public) ①
When you deploy to Heroku but it doesn't reflect well
How to deploy jQuery on Rails
How to deploy Laravel on CentOS 7
Steps to run docker on Mac
[Note] Update to production environment [heroku]
How to deploy Bootstrap on Rails
Deploy a war file on Heroku
How to deploy an app that references a local jar to heroku
Deploy to EC2 with CircleCi + Capistrano
upload images to refile heroku S3
How to connect Heroku and Sequel
Deploy Flask's Docker image on Heroku
[Note] Update to production environment (heroku)
Steps to install MySQL 8 on CentOS 8
Deploy SpringBoot application to AWS EC2
Steps to install devtoolset-6 on CentOS 7
to_ ○
I was able to deploy the Docker + laravel + MySQL app to Heroku!
Deploy your Rails app on Heroku
How to redo a deployment on Heroku
Deploy heroku with Rails6 (Cloud9 + Ubuntu) + MySQL
War deploy to Azure Web Apps (maven)
I want to display background-ground-image on heroku.
How to publish an application on Heroku
Error when trying to use heroku command
Save images to Amazon S3 (Local / Heroku)
Steps to set a favicon in Rails
Try deploying Rails app to EC2-Part 2 (Deploy)-
Deploy a Java web app on Heroku
Deploy a Tomcat-based Eclipse project on Heroku
Steps to register Java files on GitHub
Steps to Use JConsole in Cognos Analytics