This commit is contained in:
vet
2026-04-21 10:38:07 +07:00
parent cdbcad650e
commit 67ab5f5ba5
3 changed files with 208 additions and 7 deletions

View File

@@ -8,7 +8,7 @@
# 3. 安装 Node.js / npm前端依赖
# 4. 安装 Docker基础设施容器
# 5. 安装 etcdctl查看 Etcd 服务注册)
# 6. 安装 Nginx 并写入 PC/OpenIM 反代(本机 HTTP :80外部 HTTPS 由 LB/CDN 终止)
# 6. 安装 Nginx 并写入 PC/CMS/Build-CMS/OpenIM 反代(本机 HTTP :80外部 HTTPS 由 LB/CDN 终止)
# 7. 写入 /etc/profile.d/deploy-env.sh永久生效
#
# 用法:
@@ -309,10 +309,10 @@ _install_etcdctl() {
}
# ──────────────────────────────────────────────────────────────────────────────
# 6. Nginx — PC / OpenIM 统一入口(本机 HTTP :80
# 6. Nginx — PC / CMS / Build-CMS / OpenIM 统一入口(本机 HTTP :80
# ──────────────────────────────────────────────────────────────────────────────
_install_pc_nginx_proxy() {
step "安装 Nginx 并配置 OpenIM/PC 反代"
step "安装 Nginx 并配置 OpenIM/PC/CMS/Build-CMS 反代"
if [[ "$(id -u)" -ne 0 ]]; then
error " Nginx 安装需 root请执行: sudo $0 nginx"
@@ -376,10 +376,10 @@ _install_pc_nginx_proxy() {
success " Nginx 反代已启用(配置: $conf_src"
info " 本机 Nginx 仅监听 TCP 80curl -sS -H 'Host: ${proxy_domain}' http://127.0.0.1/nginx-health 应返回 ok"
info " 外部推荐入口 https://${proxy_domain}由 LB/CDN/其它网关终止 HTTPS 后转发到本机 :80"
info " 建议 .env.deploy-test 设置 PC_BACKEND_ORIGIN=https://${proxy_domain}"
info " PC 前端入口: Nginx :80 → 127.0.0.1:5173请先执行 ./deploy-test/07-start-frontend.sh pc"
info " 浏览器打开 https://${proxy_domain}/"
info " 外部 HTTPS 可由 LB/CDN/其它网关终止后转发到本机 :80"
info " PC 入口: https://${proxy_domain}/"
info " CMS 入口: http://cms-jack.imharry.work/"
info " Build CMS 入口: http://build-jack.imharry.work/"
}
# all 时非 root 则跳过(不中断 Go/Node/Docker/etcdctl