feat(deploy): initialize authentication security secrets

This commit is contained in:
2026-07-15 11:29:41 +08:00
parent 2a40ad91c8
commit 64bbf5c109
7 changed files with 238 additions and 4 deletions
+10
View File
@@ -122,6 +122,16 @@ else
echo ""
fi
# 升级已有部署时,将空值或历史默认 JWT 密钥一次性替换为持久化随机值。
# 已存在的自定义值保持不变,数据库 JWT 轮转配置仍由后端优先使用。
if [ ! -f .env ]; then
echo "❌ 未找到 .env,请先执行 start.sh 完成初始化"
exit 1
fi
# shellcheck source=scripts/init-security-env.sh
. ./scripts/init-security-env.sh
init_security_env .env upgrade
echo "==========================="
echo "🚀 开始自动安装 Docker 和 Docker Compose"
echo "==========================="