Repository navigation
Healthchecks
healthcheck: lets wip up wait until a sidecar container is actually ready before starting the
next dependency or the primary container. It works in both mode: container
(dependencies.<name>.healthcheck in wip.yml) and mode: compose-native
(services.<name>.healthcheck in compose.yml), using the same parser and polling loop.
In wip.yml (mode: container):
dependencies:
db:
image: postgres:16
env:
POSTGRES_PASSWORD: password
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 2s
timeout: 5s
retries: 10
start_period: 3sIn compose.yml (mode: compose-native):
services:
db:
image: postgres:16
environment:
POSTGRES_PASSWORD: password
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 2s
timeout: 5s
retries: 10
start_period: 3s
app:
image: myapp:dev
depends_on:
db:
condition: service_healthy| Key | Required | Default | Format |
|---|---|---|---|
test |
yes (unless block is null) |
— | string or non-empty array starting with CMD, CMD-SHELL, or NONE
|
interval |
no |
1 (1s) |
positive number of seconds or Compose duration string |
timeout |
no |
1 (1s) |
positive number of seconds or Compose duration string |
retries |
no | 3 |
positive whole number (duration strings are rejected) |
start_period |
no |
0 (0s) |
non-negative number of seconds or Compose duration string |
Unrecognized keys inside healthcheck: fail at load time.
| Form | Executed in the container as |
|---|---|
"pg_isready -U postgres" |
sh -c "pg_isready -U postgres" |
["CMD-SHELL", "pg_isready -U postgres"] |
sh -c "pg_isready -U postgres" (must take exactly one command string) |
["CMD", "pg_isready", "-U", "postgres"] |
pg_isready -U postgres directly, without a shell (needs at least one argument) |
"NONE" or ["NONE"] or healthcheck: null
|
disables the healthcheck (same as omitting healthcheck:) |
interval, timeout, and start_period accept either a plain number of seconds (2, 0.5) or a
Compose duration string made of concatenated <number><unit> segments with no separator:
| Unit | Meaning |
|---|---|
h |
hours |
m |
minutes |
s |
seconds |
ms |
milliseconds |
us |
microseconds |
Examples: "10s", "1m30s", "500ms", "1h30m". Anything not fully accounted for by valid
segments is rejected at load time. retries is always a count, never a duration.
After starting each sidecar, wip up runs wslc exec <name> <test...> with timeout enforced
per probe:
wip: waiting for dependency 'db' to become healthy
wip: dependency 'db' is healthy-
Wait scope:
wip upwaits on every sidecar that declareshealthcheck:, even if nodepends_oncondition mentionsservice_healthy. The primary container is started last and is not healthcheck-polled bywip up. -
start_periodgrace: probes still run duringstart_period(so an early pass succeeds immediately), but failures whilestart_periodhas not yet elapsed do not count againstretries. -
Retries and timeout: once
start_periodhas passed, a failing or timed-out probe increments the failure count and sleepsintervalseconds before retrying. Once failures exceedretries,wip upaborts and prints the last non-empty line of probe output (stdout/stderr):
dependency 'db' did not become healthy after 4 attempt(s) (last check exited 1): /var/run/postgresql:5432 - no response
dependency 'db' did not become healthy after 4 attempt(s) (last check timed out)
Under mode: compose-native, depends_on accepts condition: service_healthy alongside
service_started. If a service specifies condition: service_healthy for a target that has no
healthcheck: configured, wip rejects the file at load time instead of waiting on nothing. See
Compose Depends On.
-
Dependencies —
dependencies.<name>.healthcheck -
Compose File Support — supported
compose.ymlkeys -
Compose Depends On —
depends_onordering andservice_healthy - Configuration Errors — exact healthcheck validation and failure messages
- wip up — startup order and sidecar readiness waits
Introduction
Modes
Configuration
- Configuration Reference
- Config File Discovery
- Dependencies
- Networking
- Interactions
- Sandboxes
- Restart Policies
- Healthchecks
- Env Files
- Secret Masking
- Dockerignore
- Build Context Caching
- Source Sync
- Sync Modes
compose.yml support
- Compose File Support
- Compose Build
- Compose Depends On
- Compose Profiles
- Compose Variable Interpolation
Commands
- CLI Command Reference
- wip init
- wip version
- wip doctor
- wip help
- wip manual
- wip config
- wip build
- wip up
- wip ps
- wip stop
- wip restart
- wip down
- wip exec
- wip run
- wip shell
- wip logs
- wip sync
- wip dispatch
- wip sandbox
- wip volume
- wip security scan
- Global Options
- Debug Output
- TTY Allocation
Guides
- Guides
- AI-Assisted Initialization
- Migrating from dip
- Reusing an Existing compose.yml
- Fixing a Slow Boot
- Continuous Sync
- Multi Arch Images
- Using wip in CI
- Updating wip
Troubleshooting
- Troubleshooting
- FAQ
- Configuration Errors
- WSLC Not Found
- Registry Authentication
- Architecture Mismatch
- Volume Limit Reached
- rsync Not Found
- Reporting Issues
Comparison
Current development
Ruby Implementation (legacy)