From 82ba818ff456bcd6d56a06226e3f27e98fbb55c3 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 14 Aug 2025 22:58:58 -0500 Subject: removing all downloaded devdocs files --- .../docker/compose%2Fstartup-order%2Findex.html | 37 ---------------------- 1 file changed, 37 deletions(-) delete mode 100644 devdocs/docker/compose%2Fstartup-order%2Findex.html (limited to 'devdocs/docker/compose%2Fstartup-order%2Findex.html') diff --git a/devdocs/docker/compose%2Fstartup-order%2Findex.html b/devdocs/docker/compose%2Fstartup-order%2Findex.html deleted file mode 100644 index 8d747220..00000000 --- a/devdocs/docker/compose%2Fstartup-order%2Findex.html +++ /dev/null @@ -1,37 +0,0 @@ -

Control startup and shutdown order in Compose

- -

You can control the order of service startup and shutdown with the depends_on option. Compose always starts and stops containers in dependency order, where dependencies are determined by depends_on, links, volumes_from, and network_mode: "service:...".

However, for startup Compose does not wait until a container is “ready” (whatever that means for your particular application) - only until it’s running. There’s a good reason for this.

The problem of waiting for a database (for example) to be ready is really just a subset of a much larger problem of distributed systems. In production, your database could become unavailable or move hosts at any time. Your application needs to be resilient to these types of failures.

To handle this, design your application to attempt to re-establish a connection to the database after a failure. If the application retries the connection, it can eventually connect to the database.

The best solution is to perform this check in your application code, both at startup and whenever a connection is lost for any reason. However, if you don’t need this level of resilience, you can work around the problem with a wrapper script:

Compose documentation

-

documentation, docs, docker, compose, startup, shutdown, order

-
-

- © 2019 Docker, Inc.
Licensed under the Apache License, Version 2.0.
Docker and the Docker logo are trademarks or registered trademarks of Docker, Inc. in the United States and/or other countries.
Docker, Inc. and other parties may also have trademark rights in other terms used herein.
- https://docs.docker.com/compose/startup-order/ -

-
-- cgit v1.2.3