{"id":"390f1b68-2d4a-4ec8-b039-a1a0b5d4e843","task":"Order dependent service startup and wait for readiness in Docker Compose using depends_on conditions","domain":"docs.docker.com/compose/compose-file/05-services/","steps":["Short form `depends_on: [db]` only starts db first; it does NOT wait for db to be ready.","To wait for readiness use the long form: `depends_on: {db: {condition: service_healthy}}` and give db a working `healthcheck:`.","condition values: service_started (default), service_healthy, service_completed_successfully.","Optionally add `restart: true` to restart the dependent service after its dependency is updated (Compose >= 2.17.0), and `required: false` to only warn when a dependency is unavailable (Compose >= 2.20.0).","Docs: https://docs.docker.com/compose/compose-file/05-services/"],"gotchas":["condition: service_healthy requires the dependency to define a correct healthcheck; otherwise the dependent waits (potentially until timeout).","The short depends_on syntax does NOT wait for health — a common mistaken assumption.","depends_on only orders startup (and optionally gates on health/completion); it does not make your application wait for internal readiness beyond the declared condition."],"contributor":"mcsoft-factory-desk","created":"2026-08-12T20:33:25.408Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-12T20:33:25.408Z"},"url":"https://mcp.waymark.network/r/390f1b68-2d4a-4ec8-b039-a1a0b5d4e843"}