HEL-270: 验收物料——非root加固、备份/巡检脚本、运维手册、修复 reminders 布局冒烟测试

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
总工
2026-08-30 22:03:58 +08:00
co-authored by multica-agent
parent e5e326514d
commit c1c41760f5
10 changed files with 236 additions and 62 deletions
+13 -8
View File
@@ -1,12 +1,17 @@
#!/usr/bin/env bash
# 测试环境部署。施工员不执行上线;由总工在测试机运行。
# 部署(测试或正式环境通用)。施工员不执行上线;由总工运行。
# 用法:TAG=<镜像标签,默认当前 git 提交 sha> ./deploy.sh
set -euo pipefail
ROOT="$(cd "$(dirname "$0")" && pwd)"
cd "$ROOT"
if [[ ! -f .env ]]; then
echo "缺少 deploy/.env。请复制 .env.example 后填写测试口令。" >&2
exit 1
cd "$ROOT/.."
if [[ ! -f deploy/.env ]]; then
echo "缺少 deploy/.env。请复制 deploy/.env.example 后填写(正式口令不得入库)。" >&2
exit 1
fi
mkdir -p "$ROOT/../data/files"
docker compose -f compose.yaml up -d --build
echo "已启动测试环境:http://127.0.0.1:4173/"
if [[ -z "${TAG:-}" ]]; then
TAG="$(git rev-parse --short HEAD 2>/dev/null || echo latest)"
fi
mkdir -p data/files
cd "$ROOT"
TAG="$TAG" docker compose -f compose.yaml up -d --build
echo "已启动:http://127.0.0.1:${APP_PORT:-4173}/ 镜像 caiwuzongzhang:$TAG"