From c76d54a3138cee174b9fad9906ddcfd7d76ecc90 Mon Sep 17 00:00:00 2001 From: Hu Hongwei <46087189+jadelike-wine@users.noreply.github.com> Date: Wed, 25 Nov 2026 08:52:48 +0800 Subject: [PATCH] docs(deploy): check Gateway readiness through the published nginx port (#8587) --- .../src/content/en/application/deployment-guide.mdx | 10 +++------- .../application/operations-and-troubleshooting.mdx | 12 +++++++----- .../src/content/zh/application/deployment-guide.mdx | 10 +++------- .../application/operations-and-troubleshooting.mdx | 12 +++++++----- 4 files changed, 20 insertions(+), 24 deletions(-) diff --git a/frontend/src/content/en/application/deployment-guide.mdx b/frontend/src/content/en/application/deployment-guide.mdx index f392676585..80a832967e 100644 --- a/frontend/src/content/en/application/deployment-guide.mdx +++ b/frontend/src/content/en/application/deployment-guide.mdx @@ -227,17 +227,13 @@ openssl rand -base64 32 ## Deployment verification -After starting, verify the deployment: +From the host, check Gateway readiness through the nginx address you use for the workspace. The example uses the default `localhost:2026`. If you changed the Compose port, use the host port reported by `docker port deer-flow-nginx 2026/tcp`. ```bash -# Check Gateway health -curl http://localhost:8001/health - -# List configured models (through nginx) -curl http://localhost:2026/api/models +curl -i http://localhost:2026/health/ready ``` -A working deployment returns a `200` response from each endpoint. The `/api/models` call returns the list of models from your `config.yaml`. +A ready Gateway returns HTTP 200 and `"status": "ready"`. HTTP 503 with `"status": "degraded"` means a required dependency check failed. This endpoint is public. Listing models at `/api/models` requires credentials when authentication is enabled. diff --git a/frontend/src/content/en/application/operations-and-troubleshooting.mdx b/frontend/src/content/en/application/operations-and-troubleshooting.mdx index a179ec77b5..22f6f0d5d4 100644 --- a/frontend/src/content/en/application/operations-and-troubleshooting.mdx +++ b/frontend/src/content/en/application/operations-and-troubleshooting.mdx @@ -33,16 +33,18 @@ log_level: debug # debug | info | warning | error ## Health checks -Verify each service is responding: +Use the nginx address and port for your workspace (shown here with the defaults). These checks work from the host with local processes and Docker Compose. ```bash -# Gateway health -curl http://localhost:8001/health +# Is the Gateway process responding? +curl -i http://localhost:2026/health -# Through nginx (verifies full proxy chain) -curl http://localhost:2026/api/models +# Are the dependencies needed to serve runs ready? +curl -i http://localhost:2026/health/ready ``` +If liveness returns 200 but readiness returns 503, inspect the readiness response for the failing dependency. + ## Upgrading an existing checkout Keep your existing `config.yaml`, `.env`, and `extensions_config.json`; do not diff --git a/frontend/src/content/zh/application/deployment-guide.mdx b/frontend/src/content/zh/application/deployment-guide.mdx index 20fd4356e2..f3b2ca3e8a 100644 --- a/frontend/src/content/zh/application/deployment-guide.mdx +++ b/frontend/src/content/zh/application/deployment-guide.mdx @@ -221,17 +221,13 @@ openssl rand -base64 32 ## 部署后验证 -启动后验证部署: +在宿主机上,通过访问工作区时使用的 nginx 地址检查 Gateway 是否就绪。下例使用默认地址 `localhost:2026`。如果更改了 Compose 的端口,请使用 `docker port deer-flow-nginx 2026/tcp` 显示的宿主机端口。 ```bash -# 检查 Gateway 健康状态 -curl http://localhost:8001/health - -# 通过 nginx 列出配置的模型(验证完整代理链) -curl http://localhost:2026/api/models +curl -i http://localhost:2026/health/ready ``` -正常工作的部署会从每个端点返回 `200` 响应。`/api/models` 调用会返回你 `config.yaml` 中的模型列表。 +Gateway 就绪时返回 HTTP 200 和 `"status": "ready"`。HTTP 503 和 `"status": "degraded"` 表示必要依赖的检查失败。就绪检查可匿名访问。开启认证后,通过 `/api/models` 查看模型需要凭据。 diff --git a/frontend/src/content/zh/application/operations-and-troubleshooting.mdx b/frontend/src/content/zh/application/operations-and-troubleshooting.mdx index 4ddfe77e3d..95c4bf6beb 100644 --- a/frontend/src/content/zh/application/operations-and-troubleshooting.mdx +++ b/frontend/src/content/zh/application/operations-and-troubleshooting.mdx @@ -34,16 +34,18 @@ log_level: debug # debug | info | warning | error ## 健康检查 -DeerFlow 暴露健康检查端点: +通过工作区使用的 nginx 地址和端口检查 Gateway(下例使用默认值)。在宿主机上运行这些命令可检查本地进程或 Docker Compose 部署。 ```bash -# Gateway 健康状态 -curl http://localhost:8001/health +# Gateway 进程是否响应? +curl -i http://localhost:2026/health -# 通过 nginx 完整代理链验证 -curl http://localhost:2026/api/models +# 处理运行请求所需的依赖是否就绪? +curl -i http://localhost:2026/health/ready ``` +如果存活检查返回 200、就绪检查返回 503,请查看就绪检查的响应,定位出错的依赖。 + ## 升级已有的代码仓库 保留现有的 `config.yaml`、`.env` 和 `extensions_config.json`,不要再次运行