From 8362424e2e796c04818135dbbc2d0c8ff15da3f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=AE=87?= <14046434+zhang-yu0001@user.noreply.gitee.com> Date: Thu, 18 Dec 2025 13:12:56 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3service=E5=92=8Capplication?= =?UTF-8?q?=E5=81=A5=E5=BA=B7=E6=A3=80=E6=9F=A5=E7=94=A8=E6=B3=95=E5=92=8C?= =?UTF-8?q?=E6=A1=88=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/advanced-depends.md | 6 +++--- docs/spec/manifest.md | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/advanced-depends.md b/docs/advanced-depends.md index 8cc70d8..6e66e70 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 5880c29..a62d681 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 核心数 | -- Gitee