Ramblings of an aging IT geek
← Ramblings of an aging IT geek
homelab

one compose file to rule the house

Consolidating every self-hosted service onto a single docker-compose stack, and why I stopped before it grew too big.

A small server rack

For about a year my self-hosted services were a pile of docker run commands stashed in shell scripts, half of which I had forgotten the meaning of. The day I had to rebuild the box and could not remember how Jellyfin was started was the day I gave in and moved the lot into Docker Compose.

The pleasant surprise is how much a single docker-compose.yml tidies up. Every container, its volumes, its networks, its restart policy, all declared in one file I can read top to bottom. Bring the house up with docker compose up -d, take it down the same way. The services that need to talk to each other share a network by name instead of me hand-wiring IP addresses I would later forget.

I keep secrets out of the file with an .env alongside it, so the compose file itself is safe to drop in a private git repo. That git history has already saved me once, when a "small tweak" took the reverse proxy down and git diff told me exactly what past-me had broken.

The temptation is to put everything in the one file. I stopped at around a dozen services. Past that, a single stack gets unwieldy and one up can churn containers that did not need touching. So media lives in its own compose project, home automation in another, and the boring infrastructure bits in a third. Three files, three concerns, and each is small enough to understand in a glance. That is the whole trick, really: not the orchestration, just finally writing things down.