fix(worker): 显式禁用 worker healthcheck(Dockerfile 继承导致误判 unhealthy) - #55
Merged
Conversation
PR #54 删了 compose 里 worker 的 healthcheck,但 worker 共用 Dockerfile.backend,该 Dockerfile 有 HEALTHCHECK curl 8000/health (给 backend 用)。删 compose healthcheck 后 worker 继承了 Dockerfile 的 healthcheck,但 worker 不跑 uvicorn,curl 8000 必失败 → worker 一直 unhealthy。 修复:compose worker 段加 healthcheck: test: ["NONE"] 显式禁用 (覆盖 Dockerfile 继承的 healthcheck),backend 的 Dockerfile HEALTHCHECK 不变。
🔍 OpenCode PR Review Required这是一个受保护的分支,merge 前需要进行 code review。 请运行以下命令进行 OpenCode review: 或者在 PR 页面评论 This is an automated reminder from PR Review Gate. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug:worker 一直 unhealthy
PR #54 删了 compose 里 worker 的 healthcheck,但 worker 共用
Dockerfile.backend,该 Dockerfile 有HEALTHCHECK curl 8000/health(给 backend 用)。删 compose healthcheck 后 worker 继承了 Dockerfile 的 healthcheck,但 worker 不跑 uvicorn(跑python -m apps.worker.main),curl 8000 必失败 → worker 一直unhealthy。服务器实测:
docker inspect papermind-worker显示继承的 healthcheckcurl -sf http://localhost:8000/health,worker 状态(unhealthy),即使--force-recreate也一样(继承自镜像层)。修复
docker-compose.ymlworker 段加healthcheck: test: ["NONE"]显式禁用,覆盖 Dockerfile 继承的 healthcheck。backend 的 Dockerfile HEALTHCHECK 不变(backend 需要)。验证
影响