# Require Compose dependency health when startup order is insufficient

> A running database container may still be unable to serve the application starting after it.

- Canonical URL: https://update.dsesecurity.com/updates/require-compose-dependency-health-when-startup-order-is-insufficient/
- Publisher: Detection Systems & Engineering (DSE Security)
- Author: DSE Security Editorial Team
- Published: 2026-10-20T18:15:17+00:00
- Modified: 2026-10-20T18:34:32+00:00
- Last reviewed by DSE: 2026-10-20
- Resource type: Guide
- DSE priority: Information
- Topics: IT, Networks & Infrastructure
- Reading time: 2 minutes

## What you need to know

A running database container may still be unable to serve the application starting after it.

## Potentially affected

Review startup conditions and explicit-operation restart propagation in a Compose dependency chain.

## DSE recommendation

DSE recommends defining the dependency’s usable state before choosing a startup condition.

## Article

A running database container may still be unable to serve the application starting after it.

## Source facts

Docker Compose normally waits for a dependency to be running, not ready. A depends_on condition of service_healthy waits for its healthcheck, while service_completed_successfully supports a dependency expected to finish. Docker also documents restart propagation for explicit Compose operations when configured, which is distinct from ordinary process failure handling.

Source: [Docker documentation — Control startup and shutdown order in Compose](https://docs.docker.com/compose/how-tos/startup-order/).

## Applicability

Review startup conditions and explicit-operation restart propagation in a Compose dependency chain.

## DSE recommendation

DSE recommends defining the dependency’s usable state before choosing a startup condition. Keep health checks narrow enough to diagnose the dependency and relevant enough to avoid a false ready signal. Applications should still handle later connection loss instead of assuming startup order eliminates runtime outages. Document whether a dependency is a continuing service or a one-time preparation task. Keep restart propagation expectations explicit so an operator does not assume every database process restart will automatically restart all dependents.

## Verification

In a nonproduction stack, delay the dependency’s readiness and observe when the application is created or started. Exercise a failed healthcheck and a completed initialization task separately. After startup, interrupt a safe dependency connection and confirm the application’s own retry or recovery behavior remains appropriate. Retain the dependency condition, healthcheck definition and lifecycle timestamps. Ask the application owner to approve the exact readiness signal and the observed connection-recovery result instead of accepting container creation order alone.

## Official reference

[Docker documentation — Control startup and shutdown order in Compose](https://docs.docker.com/compose/how-tos/startup-order/). Reviewed October 20, 2026.

## Primary reference

- Name: Docker documentation — Control startup and shutdown order in Compose
- Authority: docs.docker.com
- URL: https://docs.docker.com/compose/how-tos/startup-order/
- Source publication date: Not stated by the source

## Citation and use

Preferred citation: “Require Compose dependency health when startup order is insufficient,” DSE Security, https://update.dsesecurity.com/updates/require-compose-dependency-health-when-startup-order-is-insufficient/
Publishing principles: https://update.dsesecurity.com/updates/dse-updates-editorial-methodology/
Usage and citation policy: https://update.dsesecurity.com/usage/
Copyright © 2026 Detection Systems & Engineering. All rights reserved.
