So I recently went on a little adventure to dockerify my personal website. Among other things, I wanted to be able to run Hugo to generate the site and have it publish using a CI system.
My website used to be published via Wordpress. I was nevery super happy with Wordpress; mostly because I really felt that for a personal blog that didn’t see much traffic it was a bit overkill. And of course, it requires a lot of maintenance - security issues regularly crop up and you need to tend to it.
Hugo was attractive because you can in theory just keep everything in a git repo, and have a CI system build the html and push it to a server on build success.
So, I started going down a path that lead me to the following;
RancherOS for running docker in a Virtual Machine
I currently have a dedicated server that I pay for that I run KVM virtual machines with. I intend to at some point get rid of this.
In the meantime I wanted a place to run my public website, a gitea instance for my git repos and a drone instance for CI.
RancherOS seems ideal as it gives you a very minimal Linux environment for running Docker applications; the intent is that you just install RancherOS then manage it remotely via Portainer. Obviously, they want you to use Rancher, but I’m familiar with Portainer.
Portainer for managing my Docker installations.
I have a server in my homelab which runs a lot of docker containers for my home stuff; the server already runs a container runnign Portainer which I use to manage my docker stacks. I use this interface to spin up stacks based on Docker Compose files.
The above gives me a Poor Man’s Kubernetes - basically if you don’t have the need for a fully fledged kubernetes installation with the whole fault tolerance thing, if all you want is to “run a bunch of containers” this works well.
Gitea for my git repo management.
Lightweight and definitely acceptable for my needs.
Drone for CI
I use this to build my Hugo site into HTML files that are then shipped into the container hosting the site.
I’ve also got an nginx proxy container with a letsencrypt companion that provides me with a way to load applications up on my RancherOS instance and proxy them all behind a single IP but with dedicated certificates for each service.
All in all, it’s pretty cool. When I get a moment I’ll document how I did it.
edit: Holy shit, it loads so much faster than Wordpress :-)