I know there are many tutorial on Google.
but I hope just official guide can have a short intro about how many web server there are,
like puma, unicorn, passanger, rainbow…, maybe a bit of history, like Mongrel
and thing like that.
Understandable yet we need to start somewhere. For instance in the Rails 7.0 demo video, Heroku is picked as a deployment choice. In the desired deployment guide, how about we cover heroku and Capistrano? We can label them as recommendations for beginners etc(following convention over config motto).
Rails should not duplicate or tunnel Heroku’s or Capistrano’s documentation. Both tutorials and references belong to Capistrano’s documentation. That’s the official one, and the one that is kept in sync with the project for certain.
Same for Heroku. To deploy in Heroku, you read Heroku’s documentation.
To help guide people, why not have a deployments section of the Rails docs that links to high quality tutorials for the most popular platforms, like Heroku, AWS Lambda, Cloud Run on GCP, etc?
Just to make sure we’re on the same page here, by linking, I mean linking to tutorials maintained by others, not maintaining tutorials here. For example, linking to Heroku’s tutorial on deploying Rails.
Until now, my deployments were done on Heroku (git push heroku main) or via a CI/CD script running on GitLab (git push origin main).
I would be interested by a solution involving packaging the Rails app in Docker (that’s the easy part) and pushing the new version on a Docker environment (for instance Digital Ocean or AWS).
I originally post this question on May 2016, now it’s 2022 Jan.
At the beginning I was deploying onto baremetal which mean I setup all the neccessary enviroment(Ruby/Node.js/etc) on my Linux(Ubuntu) server and using tools like Capistrano to deploy.
But right now we are using Docker to unify all the enviroment, now it become so much easier than before.
We are using AWS with ECS to deploy our container. (instead of using Docker Swarm or K8S)
Docker made my life so much easier.
Heroku is nice but kinda expensive and not working in China region.
I think we can write a little guide on using Docker with Rails.
Honestly, I don’t buy the “too broad topic” argument. From my point of view, Rails Guides should definitely contain a Deployment section.
Rails Doctrine says Rails should be “optimized for programmer happiness”. Programmers are not happy when they don’t know how to deploy
Rails Doctrine says “The menu is omakase”. Why not apply this principle to deployment? Pick some default ways of deployment and lift the programmer’s burden to decide by himself
In the past, Rails indeed provided some deployment guidelines. Until 2016, there was a deployment section on the home page. Until 2019, Capistrano was included in the Gemfile
Most of Rails competitors manage to include some deployment sections in their guides
A while ago, I’ve written a more in-depth blog post about this topic.
Perhaps it makes sense to discuss the scope of such a deployment guide.
If I may so bold and take my personal background as a starting point. I have over 20 years of experience running mission-critical systems that are processing all kind of transactions. But the hands-on part of this (as opposed to the conceptual side, more on that in a second) is with another technology.
So in theory I pretty well know what to do. And I can search for things like “how many threads in production” (hopefully that makes sense - it’s just an example). But then there are the unknown unknowns: the questions I am not even aware that I should ask them, because with other technologies they are not relevant or do not exist.
For me a deployment guide would not be a step-by-step list of actions to take. Those things are indeed way too specific. But if we move one level up, things change.