Files
ewoooc/docs/guides/deployment_sop.md
ogt 19342a0044 docs: 補入 docs/external+guides+memory 目錄至版控
包含:
- docs/external/aiops_saas.md
- docs/guides/deployment_sop.md / devops_handbook.md / google_drive_setup.md
- docs/memory/credentials_passbook.md / history_logs.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 16:31:50 +08:00

38 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 🚀 EwoooC 部署標準作業程序 (SOP)
> **版本日期**: 2026-04-18 (依 ADR-008 修訂)
> **目標主機**: `ollama@192.168.0.188` (經 `192.168.0.110` 跳板)
## 🛠️ 開發同步流程
由於正式環境使用 Docker Compose + Volume Mount部署邏輯如下
### 1. 本地開發與測試
在 Mac 本地完成功能開發,並確認 `./app.py` 執行無誤。
### 2. 同步程式碼 (SCP)
使用 110 作為跳板機,將本地檔案推送至 188 正式目錄:
```bash
# 同步單一檔案
scp -o ProxyJump=wooo@192.168.0.110 app.py ollama@192.168.0.188:/home/ollama/momo-pro/
# 同步目錄
scp -o ProxyJump=wooo@192.168.0.110 -r services/ ollama@192.168.0.188:/home/ollama/momo-pro/
```
### 3. 重啟容器
檔案進入掛載目錄後,重啟容器以加載變更:
```bash
ssh -J wooo@192.168.0.110 ollama@192.168.0.188 "docker restart momo-pro-system"
```
## 🏗️ 重大變更 (Rebuild)
若修改了 `Dockerfile` 或新增了 `requirements.txt` 套件:
```bash
ssh -J wooo@192.168.0.110 ollama@192.168.0.188 "cd /home/ollama/momo-pro && docker compose build momo-app && docker compose up -d momo-app"
```
## 🔍 維運指令
- **查看日誌**: `docker logs -f momo-pro-system --tail 100`
- **進入資料庫**: `docker exec -it momo-db psql -U momo -d momo_analytics`
- **檢查磁碟**: `df -h`