The `healthcheck` key in compose.yml has identical syntax in v1 and v2 (`test`, `interval`, `timeout`, `retries`, `start_period`). In Compose v2, the `depends_on` condition `service_healthy` works more reliably than in v1. Example: `test: ["CMD", "curl", "-f", "http://localhost:8080/health"]`.