Deploy apps to servers that you own and control.
Application monitoring that helps developers get it done.
Now that our backup system is in place, we can turn our attention to packaging our application and deploying it to production.
Rails applications offer a wide variety of deployment options. With Rails 8, you now have the Kamal tool, which packages your application as a Docker image and pushes it to a pre-configured server.
While this is a great addition to Rails, I’m not convinced that it’s fully mature enough to recommend to new Rails developers. When I need to ship fast but also ship well, I prefer platform providers that handle deployment efficiently.
Since we’re building a Rails app using SQLite, we can’t use the most popular Rails deployment platform—Heroku.
Heroku uses an ephemeral file system, meaning that SQLite databases would be lost across deployments. This makes it unsuitable for production applications that rely on persistent data storage.
In recent years, Heroku alternatives like Fly.io and Render have emerged. While I personally haven’t deployed a Rails application on these platforms, I’ve heard positive reviews, and they might be worth exploring if you're looking for Heroku-like simplicity with persistent storage.
For my deployments, I use Hatchbox, a Rails-friendly deployment platform.
Hatchbox allows me to:
I find Hatchbox to be a great balance between the low-level control of Kamal and the ease of use offered by Heroku-like platforms.
For this course, when we deploy Lorem News, we’ll use Hatchbox. I’ll guide you through every step to get your application live on the internet using this provider.
If you're already comfortable with Docker, I recommend giving Kamal a try.
For those who prefer managing their own server, you can provision a VPS (Virtual Private Server) and manually set up Rails, SQLite, and your web server.
One of the biggest advantages of SQLite-backed Rails applications is their low operational complexity:
That said, I don’t think managing your own server is the best option if your goal is to ship fast and efficiently, which is what we’re optimizing for in this course.