6 Commits
Author SHA1 Message Date
Zhengen 6fe5195b07 fix: waitress 生产启动加 trusted-proxy 参数,修复反代HTTPS头被清除导致的重定向死循环 2026-09-15 09:55:07 +08:00
Zhengen 88832e6084 Windows nginx模板: 拆分80/443 server块,修复HTTPS强制跳转死循环风险 2026-09-11 16:43:00 +08:00
Zhengen fc51641700 Windows部署: 后端端口统一改为8080 2026-09-11 16:34:30 +08:00
Zhengen 064dbb7561 install-nssm-services.ps1: 局部降级 ErrorActionPreference 以规避首次安装 stop/remove 失败中断脚本 2026-09-11 14:00:34 +08:00
Zhengen 6345c23f1f 修复 install-nssm-services.ps1:PS7 下首次安装报 NativeCommandError 中断
PowerShell 7.3+ 默认会把"原生命令写了 stderr 且退出码非 0"当作终止性错误抛出,
即使用 2>$null 重定向也无法拦截(触发条件是退出码而非 stderr 内容是否被消费)。
脚本里 nssm stop/remove 针对尚不存在的服务(首次安装场景)必然会返回非 0,
这是预期内可忽略的失败,此前会导致 $ErrorActionPreference = "Stop" 直接中断脚本。

修复:脚本顶部关闭 $PSNativeCommandUseErrorActionPreference。
2026-09-11 13:54:58 +08:00
Zhengen 1686794ad7 部署配置:新增 Windows Server 裸机部署流程
- requirements/production-windows.txt:Windows 专用生产依赖,用 waitress 替代
  不支持 Windows 的 gunicorn
- deploy/windows/serve-backend.ps1:waitress WSGI 启动脚本
- deploy/windows/install-nssm-services.ps1:用 NSSM 将前后端注册为 Windows 服务
- deploy/windows/nginx-wagtailcms.conf:nginx for Windows 反向代理模板(TCP 端口,
  不用 unix socket)
- documents/Windows服务器部署指南.md:完整部署步骤文档,并说明与 Linux 裸机
  部署(systemd/gunicorn/unix socket/Redis)的差异点
2026-09-11 09:39:30 +08:00