Skip to content

Conversation

@mjagyo
Copy link

@mjagyo mjagyo commented Dec 16, 2025

Introduce a --log flag for docker compose wait and docker compose up --wait to emit progress output while services are starting.

Viz(ctx context.Context, project *types.Project, options VizOptions) (string, error)
// Wait blocks until at least one of the services' container exits
Wait(ctx context.Context, projectName string, options WaitOptions) (int64, error)
Wait(ctx context.Context, projectName string, consumer LogConsumer, options WaitOptions) (int64, error)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a breaking change in the API, better pass LogConsumer as a new attribute in WaitOptions struct

flags.StringArrayVar(&up.noAttach, "no-attach", []string{}, "Do not attach (stream logs) to the specified services")
flags.BoolVar(&up.attachDependencies, "attach-dependencies", false, "Automatically attach to log output of dependent services")
flags.BoolVar(&up.wait, "wait", false, "Wait for services to be running|healthy. Implies detached mode.")
flags.BoolVar(&up.log, "log", false, "Run in attached mode and stream service logs")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine we attach to containers during wait phase by default, this seems a reasonable behavior. Users who prefer the legacy behavior (maybe in a script) can configure compose to detach or redirect output

@ndeloof
Copy link
Contributor

ndeloof commented Dec 16, 2025

For legal reasons, all commits must be signed-off. Please amend your commit with --signoff

@mjagyo mjagyo closed this by deleting the head repository Dec 17, 2025
@mjagyo
Copy link
Author

mjagyo commented Dec 17, 2025

hey man @ndeloof , created another draft base on your comments lmk

#13463

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants