Files
ewoooc/k8s/gcp/05-scheduler.yaml
ogt 1b4f3a7bbe
Some checks failed
CD Pipeline / deploy (push) Failing after 59s
feat: EwoooC 初始化 — 完整專案推版至 Gitea
- 建立 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>
2026-04-19 01:21:13 +08:00

79 lines
2.3 KiB
YAML
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.
# =============================================================================
# WOOO TECH - Momo Pro System
# GCP Scheduler Deployment
# 特點: 使用本地映像,不需要 Registry Pull
# =============================================================================
apiVersion: apps/v1
kind: Deployment
metadata:
name: momo-scheduler
namespace: momo
labels:
app: momo-scheduler
env: production
spec:
replicas: 1
selector:
matchLabels:
app: momo-scheduler
template:
metadata:
labels:
app: momo-scheduler
spec:
containers:
- name: scheduler
# 使用本地構建的映像
image: docker.io/library/momo-pro-system:latest
# 關鍵: 設為 Never使用本地映像
imagePullPolicy: Never
command: ["python", "run_scheduler.py"]
envFrom:
- configMapRef:
name: momo-config
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: momo-secrets
key: DATABASE_URL
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: momo-secrets
key: POSTGRES_PASSWORD
- name: TELEGRAM_BOT_TOKEN
valueFrom:
secretKeyRef:
name: momo-secrets
key: TELEGRAM_BOT_TOKEN
- name: LINE_CHANNEL_ACCESS_TOKEN
valueFrom:
secretKeyRef:
name: momo-secrets
key: LINE_CHANNEL_ACCESS_TOKEN
- name: GEMINI_API_KEY
valueFrom:
secretKeyRef:
name: momo-secrets
key: GEMINI_API_KEY
volumeMounts:
- name: momo-data
mountPath: /app/data
- name: momo-logs
mountPath: /app/logs
resources:
requests:
memory: "256Mi"
cpu: "100m"
limits:
memory: "2Gi"
cpu: "1000m"
volumes:
- name: momo-data
persistentVolumeClaim:
claimName: momo-data-pvc
- name: momo-logs
emptyDir: {}
# GCP 使用本地映像,不需要 imagePullSecrets