Please explain how many way we can deploy ruby on rails application in production and what is the best way ?
- Have your code on Github.
- Signup for Heroku and create an “app” there.
- On the app dashboard, go to “Deploy” and set it to auto deploy your github project.
- On the app dashboard, go to “Resources” and add Heroku PostgreSQL and Heroku Redis addons
- Go back to “Deploy” and hit the button to deploy the app. Wait until it is done
- Go back to “Resources” and add “Web” and “Worker” dynos.
- Click “Open app”
Also on youtube you can find many videos how to deploy a ubuntu or ebian server yourself for example suando capsitrano dokker.
Deploy Ruby on Rails To Production in 2019: https://www.youtube.com/watch?v=vzEEfAj45zw
Hope you don’t have a problem with it. Let me know if you need help with something.
I use it in a bunch of production servers. It has been great.
The choice of the Ruby on Rails application deployment method can be divided into two categories - your own server managed by you (e.g. hosted on Digital Ocean or AWS EC2) and code upload tool (e.g. Capistrano or similar) or a more automated cloud solution, like Heroku or AWS Elastic Beanstalk. I highly recommend the latter 2, because it saves an incredible amount of time, and they are not expensive at the beginning. Both Heroku and Elastic Beanstalk (EB) are based on Git. Deployment is as simple as
git push [heroku] [master] or
eb deploy. EB will use the git archive method and upload the archive to the servers instead of the push command while Heroku relies on your project’s repository clone.
PS. hatchbox, cloud66, dokku and digitalocean apps (nanobox) look like good alternatives to the solutions described above, but I haven’t tested them yet. They fall into category of fully automated solutions similar to AWS EB and Heroku.