compose/internal/e2e/testdata/TestUpWaitStreamsLogs/compose.yaml
Guillaume Lours d79cb959b5 feat(up): stream the logs while --wait waits for the services
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>
2026-11-17 09:35:33 +01:00

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