Docker Compose

Compose depends_on

Describe startup dependencies. Long syntax supports service_started, service_healthy and service_completed_successfully. Initial orchestration does not replace application retries or failure handling. Startup readiness does not continuously supervise the dependent application.

Formal Syntax & Structure

docker syntaxdocker
services.SERVICE.depends_on

Parameters & Attributes

NameTypeDescription
conditionstringDependency readiness or completion condition

Working Example

Example Snippetdocker
depends_on:  web:    condition: service_healthy
Docker Reference