From f039bd0c61217d7785a5c48e37c72bcbd20ca66a Mon Sep 17 00:00:00 2001 From: wangjia <809946525@qq.com> Date: Thu, 4 Jun 2026 07:20:50 +0800 Subject: [PATCH] =?UTF-8?q?fix(ci):=20deploy=20=E9=80=82=E9=85=8D=E5=AE=B9?= =?UTF-8?q?=E5=99=A8=E5=8C=96=20nginx=EF=BC=88pangolin-edge=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit nginx 已从主机迁入 pangolin-edge 容器(host 网络模式),其 /etc/nginx/conf.d 由主机 ~/pangolin/edge/conf.d bind-mount。 deploy 改为:jiu.conf 写入该挂载目录 + docker exec pangolin-edge nginx -t/-s reload,不再 cp 到主机 /etc/nginx 或 systemctl 操作 已废弃的主机 nginx。 Co-Authored-By: Claude Opus 4.8 --- CHANGELOG.md | 5 +++++ scripts/ci/deploy.sh | 13 ++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63b90b5..008f86f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.0.9] - 2026-06-04 + +### 修复 +- 适配 nginx 容器化部署:nginx 已迁入 `pangolin-edge` 容器(host 网络),deploy 改为将 jiu.conf 写入 pangolin 挂载目录并 `docker exec pangolin-edge nginx -s reload`,不再操作已废弃的主机 nginx + ## [1.0.8] - 2026-06-03 ### 修复 diff --git a/scripts/ci/deploy.sh b/scripts/ci/deploy.sh index fb6037c..832c2f8 100755 --- a/scripts/ci/deploy.sh +++ b/scripts/ci/deploy.sh @@ -126,13 +126,12 @@ mkdir -p /opt/jiu/marketing rsync -a --delete /tmp/jiu-marketing-new/ /opt/jiu/marketing/ rm -rf /tmp/jiu-marketing-new -# Update nginx config and reload. -# reload-or-restart: reload if nginx is running, start it if it's not — avoids -# `nginx -s reload` failing with "invalid PID number" when nginx isn't running -# (e.g. after an EC2 reboot where nginx didn't auto-start). -sudo cp /tmp/nginx-jiu.conf /etc/nginx/conf.d/jiu.conf -sudo systemctl enable nginx >/dev/null 2>&1 || true # auto-start on future reboots -sudo nginx -t && sudo systemctl reload-or-restart nginx +# Update jiu nginx config in the pangolin-edge reverse proxy. +# nginx now runs inside the `pangolin-edge` container (host networking), not on +# the host. Its /etc/nginx/conf.d is bind-mounted from the host dir below, so we +# write the config there and reload nginx *inside the container*. +cp /tmp/nginx-jiu.conf /home/ec2-user/pangolin/edge/conf.d/jiu.conf +docker exec pangolin-edge nginx -t && docker exec pangolin-edge nginx -s reload echo "Deploy complete!" ENDSSH