DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk6 min

I Audited 38 Production Containers. Zero Used `depends_on.restart`

A practitioner reports zero `depends_on.restart: true` use in a read-only audit of 38 containers. Here is what that sample shows—and what Compose's distinct dependency options mean.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

In an audit dated September 17, 2026, אחיה כהן found zero of seven running containers with a declared `depends_on` relationship used Compose’s `restart: true` option. That is one practitioner’s read-only sample—38 containers across 14 Compose projects on eight servers—not an industry-wide estimate. The distinction matters: `depends_on` can order startup, `service_healthy` can wait for a healthcheck, and `restart: true` can restart a dependent after an explicit Compose-controlled dependency update. They solve different problems.

What the audit found

כהן reports that the September 17, 2026 audit covered 38 running containers in 14 Compose projects across eight servers. It was read-only: the author inspected healthcheck configuration and the `com.docker.compose.depends_on` label on running containers. The author says this label exposed resolved dependency metadata for deployed containers, rather than relying on the assumption that YAML on disk precisely matched what was running. These are the author’s reported counts and method; the sample was not independently verified or designed to represent Compose deployments generally. Read the author’s audit.

As an Amazon Associate I earn from qualifying purchases.

Reported measure Result
Running containers 38
Compose projects 14
Servers 8
Containers with a healthcheck 33 of 38
Containers with any `depends_on` 7 of 38
Those `depends_on` declarations using `condition: service_healthy` 7 of 7
Those declarations using `restart: true` 0 of 7

The result answers the author’s question—whether zero use was a personal anomaly or an “everyone” pattern—only for this audited fleet. It cannot establish how common the setting is elsewhere. Docker’s documentation describes what the option does, but neither it nor this sample supplies an industry prevalence estimate.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Three Compose behaviors that are easy to conflate

Startup order: `depends_on`

Short-form `depends_on` ensures a dependency is started before the dependent service. It does not wait for that dependency to become healthy. A process can be running while its application is not ready to accept work. Docker documents short-form behavior and the available long-form conditions in its Compose services reference.

Readiness at startup: `condition: service_healthy`

In long form, `condition: service_healthy` tells Compose to wait until the dependency’s configured healthcheck passes before starting the dependent. The condition is meaningful only when the dependency has a healthcheck. The other documented conditions are `service_started` and `service_completed_successfully`: the first represents startup, while the latter waits for a one-off dependency to complete successfully. A healthcheck is a signal about the checks it performs; it does not prove every application-level initialization task is complete.

Restart after an explicit Compose update: `restart: true`

In long form, `depends_on..restart: true` tells Compose to restart the dependent service after an explicit Compose-controlled update to that dependency. Docker gives operations such as `docker compose restart` as an example. It does not mean the dependent automatically restarts whenever the dependency’s container process crashes: automated runtime restarts are excluded. Docker says the field was introduced in Compose 2.17.0; the audit article dates that release to 2023. See Docker’s startup-order guide and the Compose Specification.

Question Relevant Compose mechanism What it does not guarantee
Should a dependent start after its dependency has started? `depends_on` (short form) or `condition: service_started` That the dependency is healthy or ready for application work
Should Compose wait for a healthcheck before starting the dependent? `condition: service_healthy` plus a dependency healthcheck That the healthcheck covers every readiness requirement
Should Compose restart the dependent after an explicit Compose update to the dependency? Long-form `restart: true` Automatic reaction to runtime crash restarts, or zero-downtime deployment

The container restart policy is a separate mechanism for handling container termination. `depends_on.restart` instead concerns an explicit Compose-controlled change to a dependency. Docker and the Compose Specification both distinguish those cases. Docker service reference; Compose Specification.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What the author’s incidents illustrate—and what they do not

An n8n worker and database migrations

כהן describes a July 31, 2026 n8n upgrade in which a worker reportedly failed while the main service and worker both ran migrations against the same database. In the author’s account, Postgres had passed its healthcheck, but that did not establish that the application’s schema migration had finished. The immediate remedy was operational: wait for the main service, then restart the worker. The author put it this way: “The fix I actually deployed was that runbook line: wait for main, restart the worker.” The article says the author subsequently added an n8n dependency using `condition: service_healthy` and `restart: true`. This is the author’s incident report and diagnosis, not an independently verified finding. Author’s account.

The useful lesson is narrower than “healthchecks are useless”: a healthcheck only answers the question its test encodes. A database accepting connections may be healthy by that test while a separate application migration is still underway. Readiness checks and migration coordination may therefore need application-specific design or a runbook.

A proxy during a Docker Engine update

The author also reports that during a September 4, 2026 Docker Engine update, a proxy using `/var/run/docker.sock` became unhealthy while its container continued running under live restore. The author attributed the failure to a stale connection to the replaced socket and says manually restarting the proxy restored service. This reported scenario is an example of why a dependent may need deliberate recovery after an infrastructure update; it does not imply that `depends_on.restart` detects every unhealthy service or repairs every stale connection. Author’s account.

Cold starts and restart policies

In the same article, כהן says four of the 31 containers without `depends_on` were Rails and Sidekiq services from two self-hosted Chatwoot instances, and that they recovered from cold-start races through `restart: always`. The article also discusses healthcheck timing and delayed detection. That is useful fleet-specific context, not evidence that a restart policy substitutes for dependency readiness or explicit-update handling in other deployments. Author’s account.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How to inspect your running Compose fleet

כהן’s suggested approach is to inspect the deployed `com.docker.compose.depends_on` label on running containers, rather than infer behavior from a possibly different YAML file. This shell loop prints the label for each running container where it is present:

for id in $(docker ps -q); do
  name=$(docker inspect --format '{{.Name}}' "$id")
  deps=$(docker inspect --format '{{ index .Config.Labels "com.docker.compose.depends_on" }}' "$id")
  if [ -n "$deps" ] && [ "$deps" != "<no value>" ]; then
    printf '%s: %sn' "$name" "$deps"
  fi
done

Run it against the Docker context and host you intend to examine; the output describes only the containers visible to that context. Review the resulting dependencies and confirm the deployed configuration before changing services. Label output is an inspection aid, not a substitute for understanding each service’s startup contract. The audit author’s invitation is to count how many running containers declare dependencies and how many resolved declarations include `:true`; do that for your own fleet before drawing conclusions from the reported zero-of-seven.

When `restart: true` helps, and its operational cost

The option is relevant when a dependent can retain stale state or connections after an operator explicitly updates or restarts its dependency through Compose. Pairing it with `service_healthy` addresses a different moment: startup gating on the dependency’s healthcheck. Whether either setting is appropriate depends on the service relationship and what the healthcheck actually verifies.

כהן cautions that enabling dependency restarts can cause more services to cycle during a deployment. The setting does not itself provide zero-downtime deployment; impact depends on service behavior and deployment architecture. Consider the trade-off before opting in:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Potential benefit: a dependent is restarted after a Compose-controlled dependency update, reducing the chance it continues with stale dependency state.
  • Operational cost: dependent services may also restart as part of the update, adding disruption or sequencing requirements.
  • Boundary: runtime crash restarts are outside this option’s documented behavior; use and configure container restart policies for that separate concern.

What the zero means

In כהן’s reported sample, all seven containers with `depends_on` used `condition: service_healthy`, while none used `restart: true`. The count makes a valuable distinction visible: operators may already be expressing health-aware startup dependencies without asking Compose to recycle dependents after explicit dependency updates. It does not show that one configuration is universally right, or that zero use is typical across production fleets. The decision is service-specific: identify the readiness condition you need, then separately decide what should happen to dependents after an explicit Compose update.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.