Articles on Devops

Troubleshooting GitHub Actions with Rails and MySQL

Need help executing a GitHub Actions workflow for your Rails application, especially when dealing with a MYSQL database? Whether you’re just starting or transitioning from another CI service, navigating potential pitfalls can be challenging. If you’ve found yourself nodding along, then this blog post is tailored just for you.

Read more

Deploying Rails on Fly.io

Recently, Robby Russel posted posted on Twitter asking for Heroku alternatives for small Rails apps. Since it got quite a bit of traction, I decided to explore some options and post my experiences as blog posts.

For my first post, I’ll go for one that I’ve already used in the past and liked it very much: Fly.io

I like them because they’re dead simple and have great docs. The dashboard is pretty good too, but since I’m not one to have too many requirements around my apps, the simplicity of use is what I like the most.

Read more

Heroku-22-Stack-Upgrade-Guide

As of May 1st, 2023, Heroku will no longer be supporting the Heroku-18 stack. The reason for this deprecation is to maintain synchronization with the Ubuntu Long Term Support releases. If you are currently running your Rails application on this stack, when you navigate to the Heroku dashboard you will notice a warning to upgrade to either Heroku-20 or Heroku-22 before the end of the Heroku-18 stack life on April 30th, 2023.

While Heroku-18 will not be supported, do not be alarmed or concerned that the apps running on this stack will stop working. Heroku has confirmed that all existing applications will not be interrupted and non-build functionality will still be available. However, to maintain access to security updates, technical support and the ability to perform new builds, an upgrade will be necessary and is highly recommended.

Read more

Securely using SSH keys in Docker to access private Github repositories

If you search online for using SSH keys with Docker, to access private Github repositories, you will get a lot of search results, but the solutions you’ll find are almost all out of date, insecure, or fragmentary (i.e. they provide a small snippet of information but not a complete solution). Given how popular both Docker and Github are, I found this quite surprising. We recently had to set up Docker with a Rails application that fetches gems from private repositories. We’re also using Docker Compose, which added to the challenge. This comment on the Docker project, which is from February 2021, unfortunately is still accurate:

There are several questions and answers out there about how to pull from a private repository (using the hosts ssh key & config). A lot of them are not working, not secure or unanswered

After several hours of research and testing, we have a good solution to share. But first let’s take a look at the different approaches to consider.

Read more

Create a custom Rubocop cop

Recently I worked on a client project that required me to implement good code conventions across the project. One of the tasks besides implementing the Rubocop standard cops was to write a custom cop for two different Datetime methods, so in this article I will explain how I created a custom Rubocop cop that solved that problem.

Read more
Get the book