mirror of
https://github.com/docker/compose.git
synced 2026-11-18 06:07:53 +00:00
Without --detach, `up --wait` now attaches to the containers and streams their logs until the services are running|healthy, then ends the session and leaves them up. Until now --wait silently forced --detach, so a service failing to become healthy left no clue about why. --detach --wait keeps the previous silent behavior, and --dry-run stays on the detached plan. The library Validate accepts Wait with Attach, and still rejects OnExit, ExitCodeFrom and Watch with it. The navigation menu is disabled while waiting. Signed-off-by: Guillaume Lours <glours@users.noreply.github.com> Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
11 lines
228 B
YAML
11 lines
228 B
YAML
services:
|
|
oneshot:
|
|
image: alpine
|
|
command: echo 'hello world'
|
|
longrunning:
|
|
image: alpine
|
|
init: true
|
|
depends_on:
|
|
oneshot:
|
|
condition: service_completed_successfully
|
|
command: sleep infinity
|