Skip to content

Add timeout to --wait option #10269

Description

@mitasov-ra

Description

Assume I have the docker-compose.yml file with single service foo which guaranteed to fail immediately after I start it.

If I run

docker-compose up --wait

the command will wait forever for Healthy status of foo. Literally forever.

I think the lack of --wait-timeout or just --wait <timeout> option renders this behaviour utterly useless.

Yes, I foresee one can suggest wrap docker-compose up --wait in some code with timeout or use some command (like timeout or so), but why then we have healthcheck with all the interval, timeout and retries configurations?

It's really disappointing to see such a good feature being so poorly implemented.

P.S. Also, it seems to be a good idea not only implement timeout configuration but also add possibility to specify list of services to be waited for. And I think there's more possible enhancements.

P.P.S. On second thought, if --wait fails on any configured healthcheck failure then it already can be called very useful. But again, what if there's no configured healthchecks?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions