refactor: 项目更名 WeKnora → Academy
Build & Publish (dsh-academy) / End-to-end inside dsh (latest, advisory) (push) Skipped
CLI / test (macos-latest / go 1.26) (push) Canceled after 0s
CLI / test (ubuntu-latest / go 1.26) (push) Canceled after 0s
CLI / test (windows-latest / go 1.26) (push) Canceled after 0s
Build and Push Docker Image / build-ui (push) Canceled after 0s
Build and Push Docker Image / build-docreader (push) Canceled after 0s
Build and Push Docker Image / build-sandbox (push) Canceled after 0s
Build and Push Docker Image / build-app (amd64, linux/amd64, ubuntu-latest) (push) Canceled after 0s
Build and Push Docker Image / build-app (arm64, linux/arm64, ubuntu-24.04-arm) (push) Canceled after 0s
Build and Push Docker Image / merge (push) Canceled after 0s
Frontend / Test, type-check, and build (push) Canceled after 0s
Frontend / Docker multi-stage image (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.10) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.11) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.12) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.13) (push) Canceled after 0s
Build & Publish (mcp-server) / Build sdist + wheel (push) Canceled after 0s
Build & Publish (mcp-server) / Publish to PyPI (push) Canceled after 0s
Anydoc / anydoc parser engine (push) Canceled after 0s
App / Format, vet, test, and build (push) Canceled after 0s
DocReader / Python tests and Go client tests (push) Canceled after 0s
Build & Publish (dsh-academy) / Typecheck, test, pack (push) Canceled after 0s
Build & Publish (dsh-academy) / End-to-end inside dsh (pinned) (push) Canceled after 0s
Build & Publish (dsh-academy) / Publish to npm (push) Canceled after 0s
Go Lint Cache / warm lint cache (.) (push) Canceled after 0s
Go Lint Cache / warm lint cache (cli) (push) Canceled after 0s
Go Lint Cache / warm lint cache (client) (push) Canceled after 0s
Helm / chart (push) Canceled after 0s

- 全量替换代码/配置/文档中的项目名(保留上游 GitHub 链接、weixin 文档域名、Docker Hub 镜像名)
- 重命名 32 个含项目名的文件/目录;Go module 路径改为 academy(含 client/cli 子模块)
- docreader proto 描述符采用等长替换,保持序列化字节布局有效
- Dockerfile.app 构建网络修复: browserskill 离线产物通道、PyPI/apt 国内镜像
- 运行验证: go build ✓ docker compose up ✓ 健康检查 ✓
This commit is contained in:
runny committed 2026-11-13 20:52:51 +08:00
1 parent 9097ee699d
commit 9058149576
3136 files changed
+18018 -18004

No files matched your search

+10 -10
View File
@@ -4,7 +4,7 @@
# 执行后请直接在云控制台「制作镜像 / 创建快照 / 创建 AMI」,不要再 SSH 进来。
set -euo pipefail
WEKNORA_DIR="${WEKNORA_DIR:-/opt/WeKnora}"
ACADEMY_DIR="${ACADEMY_DIR:-/opt/Academy}"
if [[ "${EUID}" -ne 0 ]]; then
echo "[cleanup] 请使用 sudo 或 root 运行" >&2
@@ -17,26 +17,26 @@ if [[ "${ans}" != "YES" ]]; then
exit 0
fi
echo "[cleanup] 1/8 停止 WeKnora 容器"
echo "[cleanup] 1/8 停止 Academy 容器"
COMPOSE_PROJECT=""
if [[ -d "${WEKNORA_DIR}" ]]; then
cd "${WEKNORA_DIR}"
# 优先用 compose ls 拿到真实 project 名 (默认是目录名小写, 如 weknora)
if [[ -d "${ACADEMY_DIR}" ]]; then
cd "${ACADEMY_DIR}"
# 优先用 compose ls 拿到真实 project 名 (默认是目录名小写, 如 academy)
COMPOSE_PROJECT="$(docker compose ls --format json 2>/dev/null \
| grep -oE '"Name":"[^"]+"' | head -1 | cut -d'"' -f4 || true)"
docker compose down -v --remove-orphans || true
fi
echo "[cleanup] 2/8 清空 WeKnora 业务数据 + 首启 marker / 日志"
if [[ -d "${WEKNORA_DIR}" ]]; then
rm -rf "${WEKNORA_DIR}/data"/* "${WEKNORA_DIR}/logs"/* 2>/dev/null || true
echo "[cleanup] 2/8 清空 Academy 业务数据 + 首启 marker / 日志"
if [[ -d "${ACADEMY_DIR}" ]]; then
rm -rf "${ACADEMY_DIR}/data"/* "${ACADEMY_DIR}/logs"/* 2>/dev/null || true
# 故意不在这里重建 .env: 让镜像里 .env 缺失, 任何在 firstboot 之前
# 起来的 docker compose 都会因找不到 .env 而失败, 避免明文默认密码
# (postgres123!@# 之类) 把 postgres 数据卷初始化坏。
# firstboot.sh 自己会从 .env.example 拷贝并替换密钥。
rm -f "${WEKNORA_DIR}/.env" "${WEKNORA_DIR}/.firstboot.done"
rm -f "${ACADEMY_DIR}/.env" "${ACADEMY_DIR}/.firstboot.done"
fi
rm -f /root/weknora-credentials.txt /var/log/weknora-firstboot.log
rm -f /root/academy-credentials.txt /var/log/academy-firstboot.log
echo "[cleanup] 3/8 清理残留 docker 卷与构建缓存"
# 严格按 compose project 名前缀匹配, 避免误伤同宿主上其它 postgres/redis 卷。