Dockerise the website

tl;dr I didn't do it.

Take this all with a grain of salt. I am not a system administrator. I know the bare minimum necessary about Docker. If someone gives me a Dockerfile, I think I can get whatever service it's containerising up and running. I don't know what a Dockerfile is, and I don't know how it works. This is about finding the friction in containerising a small PHP+SQL-based blogging application (this one).

I recently declared bankrupcy on the server that ran this website and started over with a fresh one running an up-to-date OS and dependencies, and boy oh boy was it a headache. Ensuring that languages & compilers were installed, migrating data, writing systemd service configs. Wouldn't it be nice, I thought, if I could simply change some numbers in a configuration file somewhere, and some system or service would handle provisioning all the crap that the website needs? It would! 

So: Docker. But: Docker.

I spent the better part of a day faffing with docker-compose and trying to configure a Dockerfile, exposing the right ports and ensuring that the containerised services could all talk to each other. I configured a persistent volume and navigated conflicts with services running natively on my laptop. I researched hosts for containerised applications. I weighed the pros and cons of hosting my database separately from my application. I priced it up. I cringed.

This all turned out to be more trouble than it was worth. More than it was worth for this crummy blog, anyway. It turns out that you can't deploy a container from a docker-compose.yaml anyway. Figures.

I can see the shape of the problem that Docker solves. I can see how it abstracts away the fiddliness inherent in assurances about availability and reproduceability. If you need to spin up whole environments from nothing, and you need to do it more regularly than once a year, then Docker is probably pretty good solution. In fact it must be, or it wouldn't be such a Big Deal. But I don't have any of those problems.

I expect that this sort of Docker thinkpiece is like 8 or 9 years out of date anyway. But when I remigrate everything to another server like 3 years from now, I'm going to secondguess myself and give Docker another go, and I'm just trying to head myself off at the pass.

Docker Web

Next

More cache busting

How to cache bust static assets when you're just running a naïve script for website deploys.

Previous

Lessons learned running 50 km

A quick couple of lessons learned while running out on the fells in the Yorkshire Dales.