Some checks failed
CD Pipeline / deploy (push) Failing after 59s
- 建立 Gitea Actions CD pipeline (.gitea/workflows/cd.yaml) - 部署模式: rsync Python 檔案至 188 → docker restart (volume mount) - Dockerfile/requirements 變動時自動重建 Docker image - 部署通知: Telegram (開始/成功/失敗) - 健康檢查: https://mo.wooo.work/health (最多 5 次重試) - 同步最新 CLAUDE.md / ADR-008 / memory (2026-04-19) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
35 lines
1.0 KiB
Desktop File
35 lines
1.0 KiB
Desktop File
[Unit]
|
|
Description=MOMO Pro System - Gunicorn WSGI Server
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=notify
|
|
User=ogt
|
|
Group=ogt
|
|
RuntimeDirectory=gunicorn
|
|
WorkingDirectory=/home/ogt/momo_pro_system
|
|
Environment="PATH=/home/ogt/momo_pro_system/venv/bin:/usr/bin:/bin"
|
|
# V-Fix: 啟動前清理舊進程(暫時註解,改用手動清理或 deploy 腳本處理)
|
|
# ExecStartPre=/usr/bin/bash /home/ogt/momo_pro_system/kill_old_gunicorn.sh
|
|
ExecStart=/home/ogt/momo_pro_system/venv/bin/gunicorn \
|
|
--workers 4 \
|
|
--threads 2 \
|
|
--timeout 120 \
|
|
--bind 127.0.0.1:5000 \
|
|
--access-logfile /home/ogt/momo_pro_system/logs/gunicorn-access.log \
|
|
--error-logfile /home/ogt/momo_pro_system/logs/gunicorn-error.log \
|
|
--log-level info \
|
|
--max-requests 1000 \
|
|
--max-requests-jitter 50 \
|
|
--worker-class gthread \
|
|
app:app
|
|
ExecReload=/bin/kill -s HUP $MAINPID
|
|
KillMode=mixed
|
|
TimeoutStopSec=5
|
|
PrivateTmp=true
|
|
Restart=always
|
|
RestartSec=10
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|