This commit is contained in:
@@ -172,14 +172,15 @@ jobs:
|
||||
- name: 重啟容器(Sync 模式)
|
||||
if: steps.deploy_type.outputs.type == 'sync'
|
||||
run: |
|
||||
# ROOT CAUSE FIX (2026-04-28): 從 `restart` 改為 `up -d`
|
||||
# restart 對「不存在的容器」會失敗 → 任一外力清掉容器後下次 sync 必爆 502
|
||||
# up -d 對不存在容器會自動 create;restart 讓 Python process 重新載入 bind-mounted 檔案
|
||||
# ROOT CAUSE FIX (2026-04-28): `up -d` 確保容器不存在時可自動 create。
|
||||
# ZERO-DOWNTIME SYNC (2026-04-30): app 用 Gunicorn HUP 熱重載 workers,
|
||||
# 不重啟 momo-pro-system 容器,避免一般 Python/模板同步造成短暫 502。
|
||||
ssh -i ~/.ssh/id_deploy ollama@192.168.0.188 \
|
||||
"cd /home/ollama/momo-pro && \
|
||||
docker compose up -d --no-deps momo-app scheduler telegram-bot && \
|
||||
docker compose restart momo-app scheduler telegram-bot && \
|
||||
echo '✅ 三容器已就緒(app/scheduler/telegram-bot)'"
|
||||
docker kill -s HUP momo-pro-system && \
|
||||
docker compose restart scheduler telegram-bot && \
|
||||
echo '✅ Sync 已套用(app 熱重載;scheduler/telegram-bot 已重啟)'"
|
||||
|
||||
# ── 模式 B:重建 Docker Image(Dockerfile / requirements.txt 變動) ──
|
||||
- name: 同步所有檔案並重建 Image
|
||||
|
||||
Reference in New Issue
Block a user