diff --git a/docs/deploy-production.md b/docs/deploy-production.md index ca00e6b..0746d57 100644 --- a/docs/deploy-production.md +++ b/docs/deploy-production.md @@ -129,7 +129,7 @@ git push origin master # 2. 服务器:更新并重建(一条命令) ssh ai-kefu-jc-prod ' cd /opt/1panel/www/sites/chat2.agent.hnxinyouhe.com/index -git stash && git pull && git stash pop # stash 保住服务器本地改动(mem_limit等) +git pull docker compose build && docker compose up -d sleep 3 && curl -s http://127.0.0.1:8017/health ' @@ -164,11 +164,12 @@ curl -sI https://chat2.agent.hnxinyouhe.com/static/widget.js | grep -i "cache\|H | 现象 | 根因 | 解法(已内置,重蹈覆辙时对照) | |---|---|---| +| **两个客服互斥:起一个、另一个 502** | 1Panel 站点目录都叫 `index`,compose 默认以目录名为项目名 → 与汽车项目**同属 project "index"**,任一目录 down/up 会互删对方容器 | compose 固定专属项目名 `name: hs-ai-kefu`(3db3e5b),已重演事故操作验证互不影响 | | WS 握手 426(HTTP 正常) | 1Panel 面板生成的反代里 `Upgrade/Connection` 头**重复定义两套**,uvicorn 严格解析直接拒绝 | 拆分 ws.conf 单套路(§3),`nginx -T` dump 最终配置 + 假后端 dump 收到的头可快速定位 | | 改了 widget.js 线上"没生效" | 响应无 Cache-Control,浏览器启发式缓存旧脚本 | 已加中间件 `/static/* → Cache-Control: no-cache`(ec2d17b);用户端 Ctrl+F5 一次即愈 | | bottom-left 弹出元素溢出屏幕(面板 x=-183) | 弹出层(chat-panel / invite-container)CSS 硬编码 `right:0` 只适配右下角 | 已随 `pos-` 类联动(5d83dd9),静态测试锁死;**新增弹出元素时必须同时加联动规则** | | 1Panel 配了反代不生效 | 面板建站的主 conf 默认不含 `include proxy/*.conf` | 手工补 include 行(§3),备份后 reload | -| deploy 时 `git pull` 报本地改动冲突 | 服务器 compose/deploy.sh 有本地改动(mem_limit) | `git stash && git pull && git stash pop`(已写入 §5 流程) | +| ~~deploy 时 `git pull` 报本地改动冲突~~ | 服务器 compose/deploy.sh 曾有本地改动(mem_limit) | **已正式入 git**(3db3e5b),服务器工作区保持干净,pull 不再需要 stash | ## 8. 常见运维操作