Digital Wrenching

Another upcoming trip, another technical update. In 2018, before Trinity Site, I migrated this site from its humble beginnings on Tumblr to WordPress. I hosted it and the mapping database together on a small AWS Lightsail instance I named Alfa, where it has been running (mostly without upgrades) ever since.

When I joined Cloudflare in 2021, we were fixin’ to head out on The Backtrack. I started stealing the office supplies for better security, faster caching/delivery, and a better integration with the location database. But Alfa remained the tiny home for all these pieces, slowly collecting its digital cobwebs.

Well, as this humble blog has grown, I was hitting limits again. The original setup on Alfa was as rushed (and thus undocumented) as it was small. I’m pretty sure I could have recreated it again if I had to… but I never had a way to set up a good development environment. So I mostly just yolo’d stuff in production, like a professional.

As always, this site’s secondary purpose is to tinker with tools my teams use so that I can better understand the landscape from a technical point of view. So let’s take a big, silly swing. Route Not Found still works the same way:

s/alfa/bumbles/

But it is now hosted on a newer, larger Lightsail instance I named Bumbles … as a Docker Compose stack of five containers. Because everything is in containers now. Duhh.

  1. Custom-ish PostGIS container that ships PostgreSQL and the PostGIS extension together, with custom database init script
  2. Stock PostgREST container to take calls from the Location Service API and make them into PSQL database queries
  3. Very customized PHP7/Apache image that preconfigures everything WordPress needs to execute and manage media, matching Alfa’s configuration
  4. Stock MariaDB container for WordPress to use as a content database
  5. Stock Cloudflared container to host a tunnels backhaul so Cloudflare Workers can access PostgREST

Advantages:

  • I can spin up and destroy development servers as I need them, in just a few minutes.
  • I could move the whole thing to a server in my apartment to avoid AWS fees.
  • I could easily route WordPress traffic through the CF tunnel, too, adding a layer of security.
  • This would make it easier to start updating PHP and database service versions, which are all … very old.

Disadvantages:

  • Shit, now I use Docker for something.
  • OEaaS — Over Engineering as a Service. Or, put another way, I think I CCDC’d myself.

But it was kinda fun. Because I’m a nerd. And now I’m not worried the whole thing might irreparably implode one day if I sneeze on a terminal window. Guess I should get back to working on the Mystery Wagon now, though.

For those curious: tsmith512/rnf-deploy