This is the third time. It's finally time to launch rails via unicorn to deploy your portfolio. Since there are so many AWS-related procedure articles, here I will describe the procedure very briefly, including a memorandum. We will proceed with all 4 episodes.
|OS.Amazon Linux AMI||release 2018.03|
|Ruby On Rails||v220.127.116.11|
** I think it will take about 75 minutes with the following settings. (30 minutes if you know the setup) ** </ font>
--Description unicorn in the Gemfile of the target application --Run bundle install locally (Unicorn installation) --Editing the configuration file (unicorn.rb) created by introducing Unicorn
--Arrangement and authorization of application storage folder --Cloning the application from Git (*) --Creating an AWS-swap area to run the app (see separate article)
--Installing bundler for your application --Run bundle install of the app (it takes time) --Getting the private key of the app (rake secret) --Set the db user password (match with production) and private key in the environment variables --Create the db of the application (execute DB-Create and DB-Migrate) --Precompile of assets directory
--Open port 3000 of the instance to launch the rails app --Starting the service via unicorn
After completing this step, access "http: // ElasticIP: 3000" and you should be taken to the top page of the application.
The above is a short description. So far, not everything went straight, and an error was output. This area varies depending on the environment and settings, so I would like to post error countermeasures in a separate article.