Apexit#02 Deploy Rails App with Puma and Nginx on EC2 Ubuntu 14.04LTS instance

We have already developed our application and now we want to move it to
production. Here, I am mentioning checklist for moving our app to production. There are plenty of resources are available so we will not go in depth and recreating stuff that is already created. These are just checklist. I have also mentioned good reference for each point. I will be reachable through email if you have any questions. You can also drop your message by clicking green chat icon bottom-right most corner.

Image for post
Image for post


  1. Create one EC2 Ubuntu 14.04 instance: ref: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EC2_GetStarted.html
  2. Install RVM or rbenv: ref: https://rvm.io/rvm/install
  3. Install ruby 2.3.1: rvm install 2.3.1
  4. Install GIT: sudo apt-get install git
  5. Install Bundler: gem install bundler
  6. Install Rails: https://gorails.com/setup/ubuntu/14.04
  7. Install NodeJS: ref: above link
  8. Clone your repo
  9. RAILS_ENV=production bundle install
  10. Create one RDS instance of Postgres(optional) ref: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_GettingStarted.CreatingConnecting.PostgreSQL.html
  11. Update Database.yml and build your production Database
  12. Update security groups on EC2
  13. Setup Puma: ref: https://www.digitalocean.com/community/tutorials/how-to-deploy-a-rails-app-with-puma-and-nginx-on-ubuntu-14-04
  14. Setup Nginx: ref: above link
  15. Test

Apexit is technical articles series in which I will took one real world problem, will develop code for it together and share the source code with other people.

Mayur is a Chief Technical Architect in his organisation. He has more than three years of experience in designing and building scale able applications using different technologies.

Written by

helping companies to take the stress out of software development and make their business shine.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store