Skip to content

CICD-127 · Start and wait for a Compose healthcheck ​

Encyclopedia · Docker runtime and Compose · All snippets

Previous · CICD-126 · Next · CICD-128

1. Where it fits ​

  • Placement Bash run step following checkout, or equivalent lab terminal.
  • Prerequisites disposable Docker or Compose project with example web service.
  • Platforms local-linux, github-actions, gitea-actions.

2. Copy the snippet ​

bash
docker compose up -d --wait --wait-timeout 60
docker compose ps

3. How it works ​

Compose starts the selected project services. With --wait, completion depends on running or healthy state under its project configuration.

4. Verify the result ​

Add an application healthcheck rather than trusting only the running state.

Validation syntax-validated (Bash parse). Status definitions.