tanjilahmed87@gmail.com

DevOps4 min read

Docker Compose Setups That Actually Speed Up Local Development

A docker-compose.yml that takes four minutes to boot isn't a dev environment, it's a punishment. The fixes are almost always the same three things.

Tanjil Ahmed

Lead Software Engineer · Notionhive

A slow local environment is a tax every engineer pays every day, and it compounds — a four-minute boot times ten context switches a day times a whole team adds up to real, silent cost. Most slow Compose setups share the same three culprits.

  • Named volumes for dependencies instead of bind-mounting node_modules or vendor from the host filesystem.
  • Health checks with real conditions, not `sleep 10`, so dependent services don't race the database.
  • Multi-stage Dockerfiles with a dedicated dev stage that skips production build steps entirely.
  • One `docker-compose.override.yml` per developer preference, kept out of the base file and out of git.

None of this is exotic — it's the same discipline as production infrastructure, just aimed at a different metric. Production optimizes for reliability under load; local dev optimizes for the time between `git pull` and a running app. Both deserve deliberate engineering.

The fastest CI pipeline in the world doesn't matter if the local loop makes engineers dread starting their day.