 dujiao-nextandClaude Opus 4.7
|
1ff08fed6b
|
chore: drop api/scripts/release-templates, fullstack archive uses repo README
- 删除 api/scripts/release-templates/{README.md,docker-compose.yml}
- .goreleaser.yaml fullstack archive 改为引用 api 仓库根的 README.md
与 api archive 一致,不再附带专属部署 README 和 redis docker-compose
理由:fullstack archive 跟 api archive 用同一份 README,避免维护两套
README 内容。具体的 fullstack 部署指引留在在线文档站
(dujiao-next.com/deploy/binary),由 GitHub Release notes footer 引导用户访问。
dujiao-studio/scripts/build-fullstack.sh(本地 fallback 工具)同步移除
TEMPLATES 引用,但因顶层 scripts/ 不在 git 中,不进 commit。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-04-26 00:02:24 +08:00 |
|
 dujiao-nextandClaude Opus 4.7
|
9a7a34d928
|
feat: fullstack single-binary release support
- internal/web 包:build-tag 双模式(default no-op + fullstack embed)
- embed admin/user SPA via //go:embed all:dist/{admin,user}
- RegisterAdmin/RegisterUser 按 cfg.Web.AdminPath 配置挂载 SPA
- ValidateAdminPath 校验 admin 路径不与 /api、/uploads、/health 冲突
- admin index.html 启动时一次性把 __DJ_ADMIN_BASE__ 替换为
"/"+strings.Trim(prefix,"/"),确保 base href 是绝对路径
- 路由:router.go 在 SetupRouter 末尾挂载 web.Enabled() 块
- 启动:main.go 自动 mkdir db/uploads/logs;release+默认 admin path 时打 warning
- 配置:WebConfig.AdminPath(默认 /admin),config.yml.example 加 web 段
- GoReleaser:增加 fullstack build (linux x amd64/arm64),archive
dujiao-all_<tag>_Linux_<arch>.tar.gz 含 dujiao-server + config.yml.example +
docker-compose.yml + README.md
- CI workflow:release.yml 在 GoReleaser 之前 cross-checkout 同 tag 的
admin/user 仓库(public,无需 PAT),跑 build:fullstack/build,把 dist
embed 到 internal/web/dist
- .gitignore 排除 internal/web/dist/
老用户兼容性:默认 go build 行为完全不变(DCE 把 internal/web 包整体消除,
仅多 64 字节 build-id metadata;现有 Docker 镜像 Dockerfile 不带 -tags 不受影响)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-04-25 23:50:18 +08:00 |
|