{
  "id": "docker-compose-depends-on-table",
  "kind": "table",
  "slug": "docker-compose-depends-on",
  "iil_id": null,
  "note_url": "https://iinventedlight.com/library/notes/docker-compose-depends-on/",
  "title": "Compose depends_on with condition service_healthy waits for a dependency's healthcheck",
  "columns": [
    "name",
    "source",
    "detail"
  ],
  "rows": [
    {
      "name": "service_started",
      "source": "Docker docs",
      "detail": "the dependency has started (the short syntax behaves this way)"
    },
    {
      "name": "service_healthy",
      "source": "Docker docs",
      "detail": "the dependency is \"healthy\", as defined with healthcheck, before the dependent starts"
    },
    {
      "name": "service_completed_successfully",
      "source": "Docker docs",
      "detail": "the dependency runs to successful completion first"
    },
    {
      "name": "restart: true",
      "source": "Docker docs",
      "detail": "restarts web automatically if db is updated or restarted by an explicit Compose operation such as docker compose restart."
    },
    {
      "name": "required: false",
      "source": "Docker docs",
      "detail": "makes Compose only warn when the dependency isn't started or available; the default is true. It was introduced in Docker Compose version 2.20.0."
    }
  ],
  "related_slugs": [
    "docker-compose-basics",
    "kubernetes-probes",
    "docker-logging-drivers"
  ],
  "license": "CC-BY-4.0",
  "source_license": "Apache-2.0 (Docker docs); Apache-2.0 (Docker docs (Compose file reference)); prose restates cited source lines in own words",
  "as_of": "2026-11-18",
  "status": "fill-draft-20261118",
  "note": "Restated from the note's GREEN sources; check those sources before relying on a value."
}