I’m a returning Rails developer from the 4.2 days. Been out a couple years.
I used to use AWS Elastic Beanstalk, because we had other AWS resources that our app used.
But here I am in October 2020, trying to get even the Rails 6 “yay you’re on Rails” default app running on Beanstalk, and it’s an endless slog of deploy, fail, check the logs, google the error, try a fix, repeat.
Is Beanstalk the wrong solution now? How do people host Rails apps on AWS? I’ve never used containers - is that the approach I should take?
38 thoughts on “Where do people host their Rails 6 apps in 2020?”
Heroku is really good. In my experience if you’re getting an app running, Heroku should be the default option, and you should only change it when it starts to chafe.
Without a doubt, heroku. It helps you focus on development, not devops.
[Heroku](https://heroku.com) is a good start, though it gets very expensive if your app gets bigger. Also, DigitalOcean just launched its [App Platform](https://www.digitalocean.com/docs/app-platform/) which is a MUCH cheaper alternative to Heroku and also very easy to deploy (I tried it myself). I also heard people mention things like [Render.com](https://render.com).
I use [Cloud66](https://www.cloud66.com) with VPS’s from Hetzner so I don’t have to struggle with DevOps, but still have full control over my resources. An alternative to that kind of deployments is [HatchBox](https://www.hatchbox.io) by the creator of GoRails.
AWS OpsWorks, Chef 12, and plain ol’ EC2.
Dokku on Digital Ocean.
Kubernetes cluster or a simple Ubuntu box w/ docker-compose. Deploying using Docker is a game changer.
Lots of great suggestions here. I love Heroku. I don’t like DevOps and I need to spend my time writing apps – Heroku provides this to me and has excellent built-in support for Rails.
Edit: added a missing space
I host mine on Linode or Digital Ocean servers. All my server setup is done with Ansible; it took me a while to figure it out, but I think it was worth it.
[HatchBox](https://www.hatchbox.io/) might be worth looking into.
I wouldn’t say Beanstalk is the wrong solution now, I’d say it was never the right solution. With EB you get neither the convenience of Heroku nor the customizability of bare EC2 (at least in my experience).
I use either Heroku or EC2 + Ansible, depending on the requirements. If you’re interested in the EC2 route, [here’s a tutorial I wrote](https://www.codewithjason.com/how-to-deploy-a-ruby-on-rails-application-to-aws/).
Still beanstalk prevails
# Use Cases
Various places depending on the purpose of the application.
If it is revenue generating, it goes on a hosted infrastructure.
If it is public and something what I would be putting on my resume, it goes on a hosted infrastructure, but on the lowest tier possible.
If it is a personal project, it goes on my self-hosted environment at home. I have a kubernetes server at home and I start off any of my personal projects off with a template which gives me `bin/deploy
` so I can do something like `bin/deploy production` and it will deploy the entire application to a namespaced and isolated instance in kubernetes. It also builds out the networking which will give me a FQDN endpoint where I can access the app from anywhere. Almost no config required.
# Hosted Infrastructure
I like AWS. I’m familiar with it and the nuances around it. Pricing seems to be on par with other solutions. I’ll deploy my revenue generating applications here.
I also like heroku for the hobby projects, if it is a small site, and if pricing is a concern.
Other places like Google Cloud Platform and Azure are good too.
Digital Ocean recently announced a heroku-like service which I’ve been meaning to check out too.
The main thing when I’m deploying to a hosted infrastructure is to not have to manage servers. I would like to be able to delete them and have auto deployment scripts automatically provision new instances. So, I avoid Digital Ocean droplets and AWS Lightsail (or plain ole EC2 instances). AWS Beanstalk is really great for getting a lot of the automation and ease of use while still having nearly full control over the infrastructure.
Convox is my platform of choice right now. Think of it as offering the ease of management that Heroku brings, but with a lot more control over the underlying cloud resources (if you want it). Works with AWS, GCP etc.
AWS EKS. It’s a pretty complex setup overall with a 10 person operations team and 50 or so developers. But, we reliably serve millions of users
I use both DigitalOcean and AWS EC2 (AWS for serious stuff)
I use Ansible to automate setup of server (installing nginx, postgres, ruby etc) , then Capistrano to deploy the rails app.
EC2 is flexible and easy to use, provided you know how to setup the VPC and network stuff , I use terraform for this.
Here’s the Ansible script I wrote to setup server on Ubuntu : https://github.com/cupnoodle/rails-ansible , you can reuse this to setup your own server
Plain Docker/Compose for me. Develop locally and pull images to Debian/Docker in prod.
I run everything in Kubernetes.
We have a pretty complicated setup because we’re solving complicated problems.
We host ours on aws in various ways. Databases are hosted on ec2 clusters. API instances are hosted on ECS, and so are workers.
We have some functionality on lambdas. Using sqs and other short term databases.
We have statically compiled client side code on s3 along with documentation, files, import and export etc.
I would say aws ECS is the sweet spot between kubernetes and heroku. It’s harder than ec2-capistrano to setup but it pays off in the long term. The way containers are treated in the application lifecycle is much more reliable and faster to scale than a ec2 autoscaled fleet also.
You can still mimic this using ec2, and the aws sdk to create an AMI after each deployment, and so you can stick to capistrano. But as the instances can scale, you have to tweak capistrano a little bit to retrieve instances dynamically rather than a fixed set in the capistrano script
Kubernetes or capistrano on vms 🙂
Honestly, it depends on your use case
**Production, Multiple Apps :** You want something that can handle updates without downtime. If you foresee multiple rails/other apps that need to be hosted, investing in a robust Kubernetes process will be super helpful in the long run to manage multiple deployments/apps. IMO this is an overkill for just a single deployment and you really need to know the in’s and outs of Kubernetes to smoothly deploy your system, after which it’s an absolute charm.
**Production, Single app :** if you don’t foresee too many apps being deployed by your organisation, you can just go with something like ElasticBeanstalk or Azure AppService or even Heroku. You can have your app up and running and also utilise the tools provided by those services to handle your auto scaling, load balancing, deployments, database management, etc. This is also preferred if you don’t have too much DevOps experience
**Development/Testing:** Just spin up an EC2 instance or DigitalOcean VPS and manually setup your environment on the cloud. Optionally map that IP to a domain name for easy access for your team.
Heroku and s3. Basically the s3 storage is free, and Heroku “just works”.
The add ons are amazing – specifically MemCachier, Bonsai Elasticsearch, Heroku Postgres, SendGrid, and Heroku Scheduler.
Basically after setting everything up I’ve just done development, all the sys admin stuff is taken care of, and I don’t have to worry about it.
* HEROKU – the expensive easy way,
* AWS – the cheap hard way.
* anything else – “non standard”.
Unfortunately not so many options.
heroku or dokku on digital ocean 🙂
It’s been a nightmare trying to get Rails 6 to work on Beanstalk. I wonder if it can be fixed with a platform update or if it’s just never going to work. I should start looking into other AWS methods, I suppose.
1. For a fixed user count app (most internal webapps), just throw up nginx+passenger on a Digital Ocean server, set up your CI/CD pipeline to do “cap deploy”, and call it a day.
2. For high availability or auto-scaling you want to be on containers now. You can use Passenger’s base image as a starting point if you are clueless, and deploy to something like Kubernetes. AWS provides EKS for Kubernetes, and their own simpler proprietary alternative “ECS”. I recommend using the AWS CDK to provision the infrastructure, rather than raw CloudFormation (unless you already know your CloudFormation).
The really cool thing about container orchestration systems (good ones) is that they are self healing and can handle zero-downtime deployments for you.
i deployed mine on digital ocean, just a straight up docker-compose instance 🙂
here’s my stack starting point.
Heroku is expensive but it is awesome.
Docker in AWS EC2 or Digital Ocean, provisioned with Terraform as part of my CI/CD process
VPS. Linode or Digital Ocean. Cheap, fast, effective. And you have full control.
I run a few apps on [Heroku](https://www.heroku.com). It’s simple, reliable, and I sleep soundly at night knowing someone else is managing my infrastructure. The downside is that it gets expensive very quickly — especially once you start using the addons.
[HatchBox](https://www.hatchbox.io/) is a great middle ground between a PaaS and a VPS. It gives you the control and cost-effectiveness of a VPS, but abstracts/streamlines much of the setup/management like a PaaS would.
DigitalOcean just launched their [App Platform](https://www.digitalocean.com/products/app-platform/), which is the most compelling option to me right now. It’s a PaaS (similar to Heroku) but with much friendlier pricing and more control. Plus, DigitalOcean is just an awesome company.
If I were starting a new app today, I’d definitely explore DigitalOcean’s App Platform. I’m even considering migrating my existing app from Heroku to DigitalOcean — I’d save a ton of money by doing so.
Heroku is my go to, but its not cheap.
https://www.waypointproject.io/ looks like a good new option.
Haven’t switched everything up to 6 yet but I’ve always used a dedicated server with passenger.
Just moved from Heroku to Digital Ocean using Hatchbox and couldn’t be happier. Everything just works!
I used hatchbox.. I am a long time user… and locked in the 15$ subscription plan with unli project deployment.
Rails’ greatest benefit is that it makes web development rapid and simple. This implies that a small engage ruby on rails hosting group of developers can quickly construct and launch a web app. Libraries for the Ruby programming language are also available to augment the Rails framework with additional pre-built functionality. Because of these factors, it has become a popular framework among many entrepreneurs
Various sectors use the best Ruby on Rails hosting to develop apps and services online. This comprises marketing websites, content management systems, e-commerce sites, and bespoke online apps. It’s a popular web framework for startups because of its ease of use, which allows small teams to construct applications quickly. Due to Rails’ longevity, conventional companies are also using it.
**Navicosoft** is a specialist when it comes to [**best Rails Hosting**](https://www.navicosoft.com/ruby-on-rails-hosting/). Whether you need a completive price, best service, constant server monitoring, or maximum uptime, Navicosoft excels in all. **Ruby on Rails Hosting** enables you to create a dynamic site with the extra benefits of database interaction. In addition to this, Navicosoft provides **Ruby on Rails Hosting** Linux Unlimited, Linux Basic, and Linux Reseller **web hosting** package. Moreover, Ruby on Rails Hosting enables you to avail Linux Hosting features without any extra server software.