瀏覽代碼

【修复,文档】Oracle 二次复核反馈:.env.example 顶部加同步升级警告

Oracle reconcile 阶段指出 H2 隐藏风险:老用户升级时通常只 copy
.env.example → .env,不一定读 README。README Quick Start 的 ⚠️ 警告
达不到这部分用户。.env.example 才是「升级触达面」最大的文件。

补一段顶部警告,中英文双语,与 README Quick Start 的 ⚠️ blockquote
内容一致(必须 git pull、否则 healthcheck 永远 unhealthy + web 裸奔)。

留痕 Oracle 第 7 条必修(smoke-test.sh case 分叉无单测覆盖)跳过理由:
- smoke-test.sh 整体需 docker in docker 才能跑,CI 无法触发
- case 分叉是 shell 字符串 $VERSION 比较,无外部副作用
- tests/test-scripts.sh 39/39 已覆盖 entrypoint / open-issue / upgrade
  等核心分支,再加 case 分叉测试 ROI 低
- 风险:未来 $VERSION 多一种格式(如 0.2.0.beta1)会在 CI 第一次跑时
  才暴露;代价是 GitHub Actions 红 ×1(不是生产炸),可接受
- 留痕目的:让 reviewer 知道这是有意选择而非遗忘
PJ568 2 月之前
父節點
當前提交
4c0ea44e8b
共有 1 個文件被更改,包括 11 次插入 和 0 次删除
  1. 11 0
      .env.example

+ 11 - 0
.env.example

@@ -2,6 +2,17 @@
 # 复制为 .env 后编辑(.env 不入库,含敏感信息)
 #
 # Copy to .env and edit (.env is not committed; it contains sensitive info)
+#
+# ⚠️ 升级警告 — 升级到含 dsh 0.1.2-rc.1+ 鉴权迁移的版本时,必须先 `git pull` 同步
+# docker-compose.yml / Caddyfile / entrypoint.sh(以及其 token 抓取后台任务),仅
+# `docker compose pull` 拉新 image 配旧 compose 文件会导致 healthcheck 永远 unhealthy
+# 且 web 服务裸奔(无鉴权)。详见 PR #7 commit message 与 README Quick Start。
+#
+# ⚠️ Upgrade warning — to upgrade to a version with dsh 0.1.2-rc.1+ auth migration,
+# you must `git pull` first to sync docker-compose.yml / Caddyfile / entrypoint.sh
+# (and its token-extraction background task). `docker compose pull` alone (new image,
+# old compose file) leaves healthcheck permanently unhealthy AND exposes the web
+# service without auth. See PR #7 commit message and README Quick Start for details.
 
 # dsh 0.1.2-rc.1+:鉴权迁回 dsh 自身(一次性 token + 持久 cookie),caddy basic auth 已移除。
 # 下面两个变量自 0.1.2-rc.1 起不再被 caddy 使用,**仅在回退到 ≤0.1.1-rc.2 时生效**——