Skip to content

fix(worker): 显式禁用 worker healthcheck(Dockerfile 继承导致误判 unhealthy) - #55

Merged
Color2333 merged 1 commit into
mainfrom
fix/worker-healthcheck-disable
Jul 18, 2026
Merged

fix(worker): 显式禁用 worker healthcheck(Dockerfile 继承导致误判 unhealthy)#55
Color2333 merged 1 commit into
mainfrom
fix/worker-healthcheck-disable

Conversation

@Color2333

Copy link
Copy Markdown
Owner

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 显示继承的 healthcheck curl -sf http://localhost:8000/health,worker 状态 (unhealthy),即使 --force-recreate 也一样(继承自镜像层)。

修复

docker-compose.yml worker 段加 healthcheck: test: ["NONE"] 显式禁用,覆盖 Dockerfile 继承的 healthcheck。backend 的 Dockerfile HEALTHCHECK 不变(backend 需要)。

验证

  • YAML 合法
  • 部署后 worker healthcheck 应为 NONE(不再 unhealthy)

影响

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 不变。
@github-actions

Copy link
Copy Markdown

🔍 OpenCode PR Review Required

这是一个受保护的分支,merge 前需要进行 code review。

请运行以下命令进行 OpenCode review:

/oc review https://github.com/Color2333/PaperMind/pull/$PR_NUM

或者在 PR 页面评论 /oc 来触发 OpenCode review。


This is an automated reminder from PR Review Gate.

@Color2333
Color2333 merged commit 3fa9d40 into main Jul 18, 2026
2 checks passed
@Color2333
Color2333 deleted the fix/worker-healthcheck-disable branch July 18, 2026 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant