Upgrading in a few commands

It has been over a year now that I migrated my 2 blogs on full Docker-hosting and I wanted it to be as simple as possible for several reasons:

  • Docker is easy to work with and to maintain
  • Everything is Dockerizable
  • I don't want to spend more than an hour every month or so to upgrade my stacks

At work, we previously used CoreOS to deploy a fleet of Dockerized apps but it was hard to maintain but more specifically, CoreOS is designed for distributed apps, which is not the case of this blog.

So, I searched for a simpler way to just run a Docker container but I did not want to start from a Linux distro (CentOS or Ubuntu) and install Docker on the top of it, that too would require some system maintenance...

via GIPHY

I looked for what DigitalOcean provides as distribution and I saw RancherOS. I immediately loved the concept of having the OS layer as a Docker container itself...

Quickly enough, I scripted everything I could on my end (and I'm sure there's more to do) but today, I just upgraded all my stack within a few commands.

I host my 2 blogs at the lowest cost ever:

  • $5 per month
  • cost of the domain names
  • (days of research, trials, coding, etc.)

My first iteration was a bit cumbersome because once I cloned my blog repos on RancherOS  I needed to build the Docker images locally: which could use disk space and generate a CPU spike...
Then I remembered that DockerHub offers 1 private repository: perfect!

Now, when I need to upgrade my containers, I do it on my laptop, test them, then push the new images on DockerHub. From RancherOS, I only run a git pull and restart my Docker service.

Let's Encrypt companion and nginx-proxy pick up automatically the newly launched containers and the blogs are available in seconds! Awesome!

via GIPHY

If you have any questions or suggestions, please go ahead! Thanks for reading.

Left to do

  • Automate Docker image builds
  • Import blog themes automatically