↓ Skip to main content

Introducing Mike's DevX

·4 mins· AI-assisted

Welcome to Mike’s DevX. This is a place where I explore developer experience from more than one angle: the software we build, the tools we use, and the infrastructure that makes it run. I write about what I try, what works (and what doesn’t), and the lessons I can carry into the next project.

The homelab is part of that story. It gives me a practical place to experiment with operating systems, networks, containers, automation, and self-hosted services. Some articles focus on software engineering; others follow a service from an idea through deployment and day-to-day operation.

Why Hugo?
#

I’ll get into more detail about The Lab in a later post. For now, here’s the context for this site: my applications run as containers inside a single Proxmox LXC on a Lenovo mini PC. A reverse proxy, Pangolin, runs on a VPS and routes requests to services in the lab. Most of my applications are private and sit behind Pangolin’s SSO; this blog is intended to be publicly readable.

That setup gave me a few requirements for a blog:

  • It needed to fit into the Docker-based apps container I already run.
  • It needed to be reachable publicly through my existing ingress.
  • It should be simple to secure and have as little application surface as possible.

Hugo was a good fit. I can write posts in Markdown, keep the source and configuration in my infrastructure-as-code repository, and generate a complete static site. There is no blog application or database to expose on every page request. Hugo does the work when I publish; an unprivileged Nginx container serves the resulting files.

I use the Blowfish theme for Hugo. It gives the site its foundation, while the content and configuration in this repository make it Mike’s DevX. The theme choice was inspired in part by merox.dev.

How the pieces fit together
#

There are two paths through the architecture: the publishing path, which moves a new version from Git to the server, and the request path, which delivers the published pages to readers.

flowchart TB
    author["Write Markdown and config"] --> repo["Git repository
deployments/blog"] repo -->|"push to main"| actions["GitHub Actions
self-hosted runner"] actions --> hugo["Hugo 0.163.0
build, minify, validate"] hugo -->|"upload over SSH"| releases subgraph host["Homelab: Proxmox LXC on mini PC"] releases["Staging and versioned releases"] releases -->|"atomic symlink switch"| current["current symlink
active release"] current --> nginx["Unprivileged Nginx container
read-only mount, port 8088"] end nginx --> pangolin["Pangolin reverse proxy
on a VPS"] pangolin -->|"HTTPS"| reader["Reader's browser"]

The source, Hugo configuration, and Markdown posts live under deployments/blog/. Blowfish is included in the repository as a pinned Git submodule, so the build uses the theme version recorded alongside the site rather than fetching an untracked copy.

From a commit to a published release
#

When relevant blog files change on main, the Blog Publish workflow checks out the repository and its submodules, installs the pinned extended Hugo version, and builds the site. It also checks that the generated homepage and theme stylesheet exist before uploading anything.

The build step is deliberately small:

- name: Build site
  working-directory: deployments/blog
  run: hugo --minify --destination public

The generated public/ directory is the deployable site. The workflow sends it to the apps container over SSH using repository secrets and strict host-key checking; the private key is used by the publishing job, not mounted in the Nginx container.

The publish script first uploads into a staging directory. After checking that the staged homepage exists, it renames the directory into the release collection and changes the current symlink:

mv "$staging_dir" "$release_dir"
ln -sfn "releases/$release_id" "$site_root/current.next"
mv -Tf "$site_root/current.next" "$site_root/current"

That final rename switches the active release atomically, so requests see either the previous complete site or the new complete site, not a partially copied one. The latest five releases are retained to make recovery from a bad publication straightforward. Publishing content is separate from the Apps Hugo Update workflow, which deploys or updates the Nginx service itself.

Serving the site
#

Nginx runs in the apps-container LXC as an unprivileged container. Its filesystem is read-only, its Linux capabilities are dropped, and the published site and Nginx configuration are mounted read-only. The container doesn’t need Hugo, the repository, or deployment credentials.

The relevant Compose settings look like this:

user: "101:101"
read_only: true
cap_drop:
  - ALL
security_opt:
  - no-new-privileges:true
volumes:
  - /mnt/persistent/blog-site:/srv/blog:ro
  - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro

Nginx serves the active release as ordinary static files:

root /srv/blog/current;
index index.html;

location / {
    try_files $uri $uri/ =404;
}

Pangolin on the VPS routes the public HTTPS site to the Nginx upstream at http://<APPS_CONTAINER_IP>:8088. There is no direct WAN port-forward to the apps container. The service listens on the apps-container’s private interfaces, though; the Compose setup itself does not restrict the upstream to Pangolin alone.

The result is a short, understandable publishing chain: write and review content in Git, let Hugo turn it into static files, publish an immutable release, and let Nginx serve the active version. That architecture is also a small example of the broader theme of this blog—developer experience includes the platform and process around the code, not just the code itself.