Moving this blog to static hosting - for free!

Since the inception of this blog, it has run on a small host from Scaleway, on Docker, using the Ghost platform, and Traefik as a load balancer. You can read about it here: https://blog.devinsmith.co.za/scalable-site-in-2020/ This has been an effective solution up until now, but for 2021, I wanted to figure out how to run this site totally statically, removing the need for a virtual machine instance, and allowing me to (effectively) run the blog cost free.

2020 was a wild one

Introduction 2020 sucked for everyone, probably more for some, and less for others. I’ve had times this year where I wished it would end, I’ve had times where I didn’t know what to do, and there were times where I genuinely felt guilty for feeling like things were going great. But there were a couple things that drove me forward, taught me to relook with a different perspective, and at the end of the day, made it alright.

Running a scalable site in 2020

Running a scalable, fault tolerant, backed up, HTTPS secured, automate-able blog in 2020, for around €3,50 a month, is easier than ever. Background When I set out to start this blog, I wanted to have a cost effective setup, which would also allow me to scale the blog in future if I somehow got a load of traffic I didn’t expect. In this post, I’m briefly going to go over a few of the points around the features that this blog has for it’s incredibly low price, and hopefully show that in this day and age, it’s pretty easy to run a site for a fairly low cost, while still being confident that it can be scaled up and support thousands of requests fairly easily and efficiently if required.

Migrating from Traefik V1 to V2

As I’ve mentioned before, this blog runs a very simple set up, literally 2 containers, Traefik itself, and Ghost, the blog platform. This means, that embarking on a migration from Traefik V1 to V2 for this blog was not such a daunting task! I embarked on this project, and it was completed and up and running on V2 about an hour later! A really impressive feat, primarily brought on by the simple and effective configuration and setup of Traefik itself.

Deploying this blog with Github Actions

Having extensively used Concourse CI (https://concourse-ci.org/), Jenkins (https://www.jenkins.io/) and Gitlab CI (https://about.gitlab.com/stages-devops-lifecycle/continuous-integration/) for various different situations in a work capacity, I decided to try something new with this blog, Github Actions! With Github now having unlimited free private repos, and allowing one to use their actions platform for free (with some limits) - it seemed fitting to try and keep the codebase, as well as deployment infrastructure in the same place, without the need for an external CI/CD platform to manage this.

Validating Docker Compose files with a pre-commit hook

The Problem We have all run into this issue - you’re mid getting a service ready to deploy or update, and you make an on-the-fly change to a compose file, to update a health-check, change a deploy parameter or modify the update interval, and then, when you go to deploy the service… yaml: line 12: did not find expected key Dang! What a mess up, now we have to go back, fix the issue (hopefully test it a bit better) re-commit to the code base, potentially re run test steps, and trigger redeployments.

Offload Docker tasks to a remote Windows host!

Time for another work from home related post! We all love Docker! - it makes our lives easier, and it lets us package up just what we need into finite packages for reproduction, testing, distribution or pretty much anything else we can think of. But it definitely isn’t light on system resources. Reserving 2GB of RAM by default (at least on MacOS) and potentially using a lot of CPU power to keep all the applications we need running in the background.

Devin's working from home tips!

Welcome to Devin’s working from home tips! This article is based on what I have found works for me when working from home, things I try to focus on, day to day and things that help me be as productive as possible. So settle down, get a coffee (if you have any left) and enjoy! Find a working space that makes sense for you. That space and the way it’s set up might change on a day to day, and that’s alright.

Woah, I'm back!

I have finally returned! After much deliberation, decided to bring this blog back up, can’t believe it was at least 2 years ago since my last post! Thought it might be fitting to do some posting during these trying (isolation) times! First post coming immediately! (literally, I’m about to post it) -Devin