Docker Compose for Self-Hosting
The practical guide to running real self-hosted services with Docker Compose — restart policies, networking, volumes and backups, secrets, build vs pull, debugging, and the down/stop/kill difference — grounded in the author's own homelab compose files.

Part 1
Docker Compose Restart Policies Explained
The power blipped, the host rebooted, and half the homelab stack came back up on its own — the other half just sat there, exited. Every container had a restart: line; they weren't all the same line.

Part 2
Docker Compose Networking Explained
Two containers on the same host could reach each other, and neither one was supposed to. Both had landed on Docker Compose's default bridge network — a network that doesn't ask permission before connecting things.

Part 3
Docker Compose Volumes and Backups Explained
I ran docker compose down -v to force a clean restart, out of muscle memory from a different project where that flag was harmless. It wasn't harmless here — it deleted a named volume along with the containers.

Part 4
Docker Compose Secrets vs .env Files
I pasted a fresh Postgres password straight into environment: on a new compose file, then stopped with my cursor over git add . That password was about to sit in plain text in a repo I push to self-hosted Gitea, not because I was careless, but because environment: is the path of least resistance.

Part 5
Docker Compose Build vs Pull vs --no-cache
I edited a Dockerfile, ran docker compose up -d, and the container came back up running the exact same code it had before. No error, no warning, just silence, and a service that looked started but was not the one I had just changed.

Part 6
Debugging a Broken Docker Compose Stack
A fixed triage order for a Docker Compose service that won't start: docker compose ps, logs --tail, the exit code, and the healthcheck status -- in that order, before restarting anything, plus how to tell a real crash loop from a slow first boot.

Part 7
Docker Compose Down vs Stop vs Kill
I ran docker compose stop expecting the stack to fully disappear. A few seconds later, docker compose ps still listed every container and the default network was still there, nothing had been removed, just stopped.

Part 8
Docker Compose for Self-Hosting: The Guide
Restart policy, networking, volumes, secrets, build vs pull, logs, and teardown — the seven decisions a self-hosted Docker Compose stack forces, mapped in one guide with a real annotated compose.yaml and links to a deep dive on each.