The Server this website is hosted on

my server

Yup, that’s the entire setup, consisting of:

Issues and Fixes

This project brought its fair share of challenges regarding hosting. Here are some issues I encountered and how I tackled them.

Domain

Everyone needs a domain, right? I mean, I can’t expect anyone to remember and type in 95.115.38.204/projects/server, can I? Exactly, so I went to a host and secured panderu.org for myself. Now, the trick was to point it to my IP – my dynamically changing, non-static IP that updates every 24 hours. Luckily, my hosting provider offered a built-in DynDNS service, which I promptly utilized. Despite some frustrations and a newfound disdain for their Web-UI, we made it work.

This Website Specifically

It’s pretty obvious this is a simple Hugo theme I’m rocking here. And why not? It’s sleek, manageable, and just works. I had a few pages built locally, and everything seemed peachy. The next logical step was to containerize it and deploy it to my server, letting my reverse-proxy broadcast it to the world (dramatic, I know, but bear with me). That’s when I stumbled upon the klakegg Hugo container. Simple enough, right? Set it up, throw my project in, and voilà. Except, not quite. It turns out most of the images are designed for AMD64 systems, and my server, as depicted, runs on ARM architecture. The snag? The ARM images only offered the standard Hugo version, while my theme demanded the extended version.

My Solution

Far from ideal, but here’s the rundown: I resolved that I had to craft my own container. Starting with Alpine, I attempted to build Hugo from scratch. Forty minutes in, with little to show for it, I waved the white flag. Building from source was off the table. Package manager installations proved equally tedious, and the mere thought of using Snap to install Hugo (not even an option on Alpine) sent shivers down my spine. After much digging, salvation came in the form of a precompiled binary on GitHub’s release page. It took embarrassingly long to discover, but it was exactly what I needed. I tweaked my Dockerfile to fetch the binary, extract it, and slot it into my path. Here it is

Getting Hugo to Build

Here’s the kicker: Hugo, bless its heart, insists on having a git repository within the project folder to build the site. The rationale eludes me – if you’re in the know, hit me up on LinkedIn. My workaround? Initialize a repo and commit everything within the container. It’s a clunky solution, but it bridged the gap.

My Pipeline

The site is powered by a pipeline, marking my maiden voyage into the realms of pipelines, GitHub Actions, and Docker. Rather than a gentle introduction, I dove headfirst onto a solid layer of ice. Grasping the concept of CI/CD and its perks took a minute, but it’s been a revelation. The ease of updating the site, coupled with a relatively smooth operation, has been a highlight. Diving into CI/CD has been enlightening, and I’m eager to explore further.