Introduction
Hi All, this is the 3rd post of our deployment tool, so far we have covered the Setup for instance and installing ruby and postgres. Now what we want is to install the Nginx and Unicorn. Nginx is our App server and Unicorn is our web server. We are Not going to explain about the concepts of nginx and Unicorn; instead we used these tools to deploy our App.We already had a staging server, we used that to setup and installation.
A little House keeping
Image of the staging server is running.
terminal connection in staging server
Setup Nginx
1
|
|
Now Check the nginx status using
1
|
|
other commands
to restart nginx
1
|
|
to stop the nginx
1
|
|
to start the nginx
1
|
|
here we are not configuring the nginx right now, we will do that later.
Installing Unicorn
Like I already said, we are using the unicorn as app server,by default puma is the development server with Rails 5.X.X.
1.add the unicorn gem to production group
1
|
|
- add the unicorn configuration file in config/ path
Consider only the unicorn.rb file only.The total scripts are added below for verification, Like I already said, there are a lot of configurations are there. Just google it for details.
3.commit these code changes to our code base, since I have already commit those, I don’t want do it again. I know, it is only a short blog, we just covered here, will explained about deployment using mina in the next blog,!!promise