mirror of
https://github.com/docker/compose.git
synced 2026-11-17 13:45:39 +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>
9 lines
250 B
YAML
9 lines
250 B
YAML
services:
|
|
app:
|
|
image: alpine
|
|
init: true
|
|
command: sh -c 'echo booting; sleep 3; echo ready-to-serve; touch /tmp/ready; sleep infinity'
|
|
healthcheck:
|
|
test: ["CMD", "test", "-f", "/tmp/ready"]
|
|
interval: 1s
|
|
retries: 30
|