Skip to content

--await for healthcheck #8003

@James-E-A

Description

@James-E-A

When running docker-compose up -d, I'd like to be able to block until the container is actually running and "healthy", if possible.

e.g., a service will wait for its dependencies to be healthy before starting, but I'm kicked back out to the shell (or shell script, as it were,) before waiting for the actual invocation to mature to health.

I propose syntax along the lines of

#!/bin/sh
docker-compose up -d --await=web &&\
  echo "The service is running and healthy." ||\
  echo "There was a problem bringing up the service."

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