- 新增根目录Dockerfile:多阶段构建(Vue前端 + Go后端),包含main.go依赖的 internal/packed资源打包步骤(原来依赖gf build外部产出,未提交进仓库) - 新增server/manifest/config/config.template:数据库/Redis连接串、 token密钥等敏感配置改为占位符,运行时通过entrypoint.sh用envsubst生成 真正的config.yaml,不再需要在仓库里维护包含真实密码的config.yaml - entrypoint.sh改为先渲染配置再启动 - 修复web/pnpm-lock.yaml与package.json不同步的问题(有依赖被加进 package.json但没重新生成锁文件) - 新增web/pnpm-workspace.yaml:较新版本pnpm默认禁止依赖包运行构建脚本 (供应链安全特性),需要显式在这里批准esbuild/@swc/core等的构建脚本, 否则CI环境下frozen-lockfile安装会直接失败
13 lines
374 B
Go
13 lines
374 B
Go
#!/bin/sh
|
|
set -e
|
|
|
|
cd /app
|
|
|
|
# Render the real config from the template using only the specific env vars we
|
|
# expect — avoids accidentally substituting anything else that might contain a
|
|
# literal '$' in the YAML.
|
|
envsubst '$MYSQL_DSN $REDIS_ADDR $REDIS_DB $REDIS_PASSWORD $TOKEN_SECRET_KEY' \
|
|
< manifest/config/config.template > manifest/config/config.yaml
|
|
|
|
exec ./hotgo
|