My homelab runs about a dozen services, all of them plain Docker Compose files in a git repository. No orchestrator, no cluster - just one small machine and a folder structure I can still understand at midnight. These are the patterns that have survived three years of use; everything fancier got deleted.

One directory per service, one network per stack

Each service gets its own directory with its own compose.yaml, .env, and a short README saying what it does and how to restore it. Services that need to talk to each other share an explicitly named network; nothing joins a default network by accident.

Pin versions, update deliberately

services:
  immich-server:
    image: ghcr.io/immich-app/immich-server:v1.125.7
    restart: unless-stopped
    env_file:
      - .env
    volumes:
      - ./data:/usr/src/app/upload
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:2283/api/server/ping"]
      interval: 30s
      timeout: 5s
      retries: 3

The latest tag is a surprise generator. I pin every image to a version, and updating means editing the version, skimming the release notes, and running docker compose pull && docker compose up -d - after the nightly backup, not before.

The habits that matter most

  • Healthchecks on anything other services wait for. Half of my early “the app is broken” reports were really “the app started before the database was ready.”
  • Logs capped at the source: logging: { driver: json-file, options: { max-size: "10m", max-file: "3" } } on everything. A full disk from an unhappy container is a rite of passage I only needed once.
  • Backups treat Compose directories as data. The whole /srv tree, compose files included, goes into restic nightly. Rebuilding the lab is restoring one directory and running a script.

Compose is not glamorous, and that is exactly the point. Boring tooling, kept current, beats a clever platform I have to debug on a holiday.