Chris Oliver (GoRails) and I were talking about the Rails ecosystem recently when he dropped a bombshell on me about something called Hatch:
I’m making a way for people to provision their own own Rails’ servers
As someone who admires the Laravel ecosystem, I had become increasingly jealous of Laravel Forge. When Chris broke the news to me that we’d have a tool to do that with Rails, I flipped my desk, walked from Memphis to St. Louis and gave Chris a hug.
So, GoRails Hatch!
What does Hatch do?
Configure Ruby on Rails servers in minutes and without hassle on Digital Ocean.
Hatch takes the pain out of provisioning servers and setting up Ruby on Rails applications on those servers. Provisioning a server gives you Ruby, Nginx, Passenger, Postgres, and more from an easy to use web application.
Most importantly to me, it’s “secure by default.”
Every server we configure for you includes SSH and firewall security out of the box. You even get automatic security updates installed regularly for you.
Though it’s still your responsibility to handle security, this is a great stepping stone for you to secure your applications.
Why do I need Hatch?
If you’ve ever written any Ruby on Rails code, it’s highly likely you’ve deployed that code to Heroku. Heroku is fantastic. Heroku allows me to focus on my code, not servers and deployment. However, Heroku can get expensive. Not every application I’m building is for a client, nor is every application I create a “money-maker.” $15 to manage a server is a great exchange
$15 to manage a server with as many applications as the server can handle is of great value to me.
How do I get started?
Well, that’s the fun part. Let’s walk through setting up a server with a Rails application.
1. Creating a server
Ah… the fresh feeling of a blank slate. You’ve just signed up, and you have the entire world at your fingertips.
Creating a server could not be any easier.
- “Naming and cache invalidation” are the two hardest things in our world. Chris has solved the first one here by auto-generating a server name for us.
- There’s an excellent explanation of what size server you should select, alongside pricing. I’m going to keep it simple, here.
- 2.2.6 is the minimum Ruby version you can use all the way up to 2.4.1
- I’m using Ruby 2.4.0 for this server because I’m progressive, but not too wild.
Here’s the best part, you’re done creating a server! Grab some coffee, take a nap, whatever you want to do. Once the server is provisioned (within minutes), you’ll get an email with the relevant details to your server.
2. Creating an application
Man, that was easy. How hard is it to add an application?
The first step is to make sure your application is configured with PostgreSQL and the appropriate configuration options. Everything you need is listed at the top of the page. Once you’ve done that, you can continue to create your application. Once you’ve settled on a name (or used the one provided), you can select your provider and the repository.
(I’ll be using the sample app hatch-app/todolist)
If your application uses and custom environment variables or domains, be sure to add them here as well.
Once again, Hatch handles everything from here. Sit back and relax.
3. Managing your application
A quick trip to http://hatch.jasoncharnes.com/ will show you the launched application. That was so easy, and it’s my own virtual machine.
- Do you need to add an ENV var?
- What about adding a domain?
- Need to customize the deployment script?
- Push an update to the repo ready for deployment?
Hatch gives you access to all of that on the application page.
You’ve seen how easy it is to provision a server and deploy your Ruby on Rails application. The best part is you have full control. You can add your SSH key and gain access to your server.
Give Hatch a shot, see if it’s a good fit for your problem. For me, Hatch is taking my pain-point and fixing it. Time is limited. I want my time spent writing code, not managing servers.
Interested in More?
I'm an open book!
Drop me your email 👇🏻 and I'll share posts like this with you as I write them.