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

one compose file to run the entire flat

Consolidating a sprawl of home services into a single docker-compose stack on one box, the directory layout that keeps it maintainable, and why one file beat a pile of hand-started containers.

A small server rack with a single host running several services

The homelab had grown the way they all do: a Pi-hole here, a media server there, a thing I started one evening and forgot how I started. Each was a container I had run by hand with a long docker run line I could no longer reconstruct. When the host needed rebooting I dreaded it, because half the services would not come back and I would spend an evening rediscovering flags.

So I spent a Sunday folding the lot into a single docker-compose.yml. Now every service is declared, versioned in a git repo, and comes up with one command. The directory is flat and boring on purpose:

services:
  pihole:
    image: pihole/pihole:2021.09
    restart: unless-stopped
    volumes:
      - ./pihole/etc:/etc/pihole
    ports:
      - "53:53/tcp"
      - "53:53/udp"

  jellyfin:
    image: jellyfin/jellyfin:10.7.6
    restart: unless-stopped
    volumes:
      - ./jellyfin/config:/config
      - /srv/media:/media:ro

Every service pins a version, mounts its config into a folder next to the compose file, and sets restart: unless-stopped so a reboot brings the whole flat back without me. The win is not performance, it is that the state of the house now lives in one file I can read. When something needs upgrading I bump a tag and docker compose up -d. When the box reboots, everything returns. And when I inevitably forget how a service is wired up, the answer is right there in version control rather than in my unreliable memory.