DevOps With Ruby on Rails Part 1: How To Deploy An App With Hatchbox and Digital Ocean

Corey Gardner
2 min readFeb 9, 2022

Building a Rails app can definitely be a challenge but getting it onto the internet is a whole other animal. A lot can go wrong and there is very little documentation on Rails DevOps, which is why I’m writing this series. By the end of this article you’ll know how to deploy a Rails app with Digital Ocean and Hatchbox.If you aren’t familiar with either of these services in particular or cloud computing in general allow me to take a moment to explain.

Digital Ocean is a cloud hosting provider, they rent out virtual and bare metal servers. Cloud hosting has become very popular because it allows companies to automate the boring stuff, scale their apps appropriately and save money.

Hatchbox is a Platform as a service or PaaS that automates setting up and managing the Rails apps on our server. Basically it’s a Rails app for deploying Rails apps, how cool ! Hatchbox will do take care of the boring stuff like configuring our web server and database. I prefer Hatchbox over Heroku because it’s more flexible and easier to use. Once you’ve signed up for a Hatchbox and Digital Ocean account you’ll be ready to get started.

Step 1: Creating a Cluster

A cluster is a group of servers that will be used to host your app. The most basic tier of Hatchbox will allow you to create one cluster that host all of your apps. Go to the clusters tab on Hatchbox and click the new cluster button. Choose Digital Ocean as your cloud provider and start creating your cluster. If you’re a hobbyist one cluster will allow you to deploy several small applications.

Step 2: Deploying your app

Find the apps page and click create new app. You’ll find this form to be very self explanatory. Choose the cluster you just created, add a repository and a database and click go. You’re all set !

Corey’s Corner Podcast: https://anchor.fm/coreys-corner
Gardner App Development: https://gardnerappdev.com
Get Yoked 🍳 https://thoughtsandfitness.com
Learn To Code: https://www.youtube.com/channel/UCfd8A1xfzqk7veapUhe8hLQ

--

--