Using Docker for your Rails App in Production

preview_player
Показать описание
WARNING: This video is a rant!

I go over my opinions and experience in trying to get a Ruby on Rails app onto a remote server in Production mode. It wasn't a good time.

Looking for great hosting? I've been using DigitalOcean for 7 years and they have never let me down. Amazing.

#rubyOnRails #entrepreneurship #softwareDevelopment
Рекомендации по теме
Комментарии
Автор

Great video Phil! I started following you since i found one of your video on setting up stripe for a ruby on rails application!
I can only relate to the pain of deploying a dockerized ruby on rails application with all db, redis and so on...

I'm hosting my app on a private server (raspberry pi 4). Easy to do for static website, react app.

But deploying a ruby on rails application i never found a way to do it.

With Docker, same issue so far!

Have a good day and keep the good work!

LucasIlliano
Автор

I think the benefit of Docker in production is that it can help manage dependencies, such as Rails version and database version etc. You can also package the gems in the Docker image as well. Ironically, I think simplifying those environment tasks makes more sense for small scale setups than for a large scale setup. Like you say, for a successful business-driven app you'd have the resources to manage the servers themselves. I'm working on a video right now for my channel showing how I got my program to run Docker in production and deploy using Capistrano. It's a suboptimal solution because the way Capistrano runs tasks and folder structure doesn't play well with Capistrano.

WinstonCodesOn
Автор

What is your favorite way to deploy a rails app and what hoster is your favorite for rails?

ministerstein
Автор

Love your video as always, Phil! Any chance you could talk about best practices for writing a rails API that can communicate with a mobile app frontend like Flutter?

coop
Автор

I echo A LOT of what you're saying Phil. Also, I love the hammer analogy! 🤣

deenlong
Автор

Thank you sir! You absolutely convinced me of the same. Diving in to your content my friend!

TinyLifeTAKEOVER
Автор

You might consider giving CapRover a shot. We use it with Linode and it works well. Can't bring myself to change over to DO and with the Nanobox fiasco, well, just a non-starter.

ylluminate
Автор

I'm using docker-compose with capistrano for a long time, not just for the database, but also for deploying the application and background workers. Yes, it works using capistrano through ssh on docker container. The benefit is I can start staging the server in 10 minutes on any server, with just 5 commands, and it will have everything the same as in the production.

DmitryPolushkin
Автор

Hi Phil, current rails version is coming with a ready to go Dockerfile, and Rails seems to encourage deploying with docker, have you changed your mind since you uploaded this video 1 year ago?

simomed
Автор

Well, to me the benefit is having a Heroku-like serverless experience. I want to focus on my application and creating business value, not on running servers. E.g., I don't want to do Ubuntu security configuration anymore, OS upgrades, etc. I can easily try different server sizes with a couple button clicks, etc. So I think the idea isn't Docker per se, it's that it enables one path to serverless application development. I used to use capistrano and manage my own VPN. But it's a lot nicer to just do a git merge to master which triggers a new rolling deploy with no downtime. And I didn't have to create and manage that process. ?

Ashton
Автор

Have you tried kubernets? You need an orchestrator to work fine

ticoh
Автор

I’m using AWS ECS and docker containers for a rails API project. Works great but not super easy to setup. Getting the docker file setup correctly to build a production image can be tricky but is very doable. Lots of benefits of running this way on AWS, scaling, redundancy, etc. I use Capistrano with other projects and that method is more straightforward and works great as well.

preppytech
Автор

I did it using a docker container and AWS Fargate, and run flawlessly... 🤷‍♂

raulhespinosa
Автор

I don't know if It's just me but docker is slow on my machine, I don't think docker should be use on production

erickzelaya
Автор

deploying in 5 minutes, that would be great to watch in another video. Thanks for showing us how frustrating and pointless can be trying to introduce some stacks to our productivity work. Sometimes you can just know even when others told you need to do this or this, with that experience you have you just know is more easy doing in other ways.

AryCaemaH
welcome to shbcf.ru