diff --git a/docs/advanced-depends.md b/docs/advanced-depends.md index 8cc70d8d6c7405bc074812b802cae4fd5f33648b..6e66e70532b2a8bbcca429176bba0892b563a46f 100644 --- a/docs/advanced-depends.md +++ b/docs/advanced-depends.md @@ -11,7 +11,7 @@ depends_on 绝大部分情况, `depends_on` 仅需要在 `services.$service_name` 字段下使用,类型为 `[]string` 其中每一条填写一个 `$service_name`,当前 service 在启动时会等 `depends_on` 中所有的 service 的容器状态为 `healthy` -`service.$service_name.health_check` 字段会影响 service 进入 `healthy` 状态, 此字段与 docker-compose 的 healthCheck 语义一致, +`service.$service_name.healthcheck` 字段会影响 service 进入 `healthy` 状态, 此字段与 docker-compose 的 healthCheck 语义一致, 但只支持以下 4 个字段 ```go type HealthCheckConfig struct { @@ -22,12 +22,12 @@ type HealthCheckConfig struct { } ``` -health_check 示例: +healthcheck 示例: ```yml services: wordpress: image: bitnami/wordpress:5.8.2 - health_check: + healthcheck: test: - CMD-SHELL - "curl -f http://localhost:80/ || exit 1" diff --git a/docs/spec/manifest.md b/docs/spec/manifest.md index 5880c29d36088a0cc68b6ad7b08e80e01ce79891..a62d681c28ea81fd40d131f75d6a7c05017b243f 100644 --- a/docs/spec/manifest.md +++ b/docs/spec/manifest.md @@ -65,7 +65,7 @@ | `workdir` | `string` | `app` 容器启动时的工作目录 | | `ingress` | `[]IngressConfig` | TCP/UDP 服务相关 | | `environment` | `[]string` | `app` 容器的环境变量 | -| `health_check` | `AppHealthCheckExt` | `app` 容器的健康检测, 仅建议在开发调试阶段设置 `disable` 字段, 不建议进行替换, 否则系统默认注入的自动依赖检测逻辑会丢失 | +| `health_check` | `AppHealthCheckExt` | `app` 容器的健康检测, 仅建议在开发调试阶段设置 `disable` 字段, 不建议进行替换, 否则系统默认注入的自动依赖检测逻辑会丢失,只可以在 `application` 字段下使用,`service` 字段下请使用 `healthcheck` | ## 五、 `HealthCheckConfig` 配置 ### 5.1 AppHealthCheckExt @@ -113,7 +113,7 @@ | `command` | `*string` | 对应容器的 command, 可选 | | `tmpfs` | `[]string` | 挂载 tmpfs volume, 可选 | | `depends_on` | `[]string` | 依赖的其他容器服务(app这个名字除外), 仅支持本应用内的其他服务, 且强制检测类型为 `healthly` 可选 | -| `healthcheck` | `*HealthCheckConfig` | 容器的健康检测策略, 老版本`health_check`已被废弃 | +| `healthcheck` | `*HealthCheckConfig` | 容器的健康检测策略,只可以在 `service` 字段下使用,`application`字段下请使用 `health_check` | | `user` | `*string` | 容器运行的 UID 或 username, 可选 | | `cpu_shares` | `int64` | CPU 份额 | | `cpus` | `float32` | CPU 核心数 |