-
Notifications
You must be signed in to change notification settings - Fork 485
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wait for depends_on conditions before starting containers
This commit implements the long-syntax / conditional depends_on compose mechanism which instructs the compose system to wait for a certain condition before starting a container. Currently available conditions are: - service_started: same behavior as before this commit, the depending container will start as soon as the depended on container has started - service_healthy: if the depended on container has a healthcheck, wait until said container is marked as healthy before starting the depending container - service_completed_successfully: wait until the depended on container has exited and its exit code is 0, after which the depending container can be started This mechanism is part of the v3 [1] compose spec and is useful for controlling container startup based on other containers that can take a certain amount of time to start or on containers that do complicated setups and must exit before starting other containers. [1] https://red.ht/conditional-depends Signed-off-by: Adrian Torres <[email protected]>
- Loading branch information
Adrian Torres
committed
Mar 21, 2022
1 parent
30e5223
commit fcbf15e
Showing
2 changed files
with
95 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters