All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 59m58s
生产环境 deployment 缺 AI_ENABLED/AI_API_KEY 等变量,导致 scheduler 里的 AI OKR 分析分支被跳过,cron 只跑了 gitea 同步而没触发 OKR 更新。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
95 lines
2.3 KiB
YAML
95 lines
2.3 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: devperf-backend
|
|
labels:
|
|
app: devperf-backend
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: devperf-backend
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: devperf-backend
|
|
spec:
|
|
imagePullSecrets:
|
|
- name: cr-pull-secret
|
|
containers:
|
|
- name: devperf-backend
|
|
image: ${CI_REGISTRY_IMAGE}/backend:latest
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- containerPort: 3200
|
|
env:
|
|
- name: PORT
|
|
value: "3200"
|
|
- name: JWT_SECRET
|
|
value: "devperf-jwt-secret-prod-2026"
|
|
# MySQL (私网地址)
|
|
- name: MYSQL_HOST
|
|
value: "mysql8351f937d637.rds.ivolces.com"
|
|
- name: MYSQL_PORT
|
|
value: "3306"
|
|
- name: MYSQL_USER
|
|
value: "zyc"
|
|
- name: MYSQL_PASSWORD
|
|
value: "Zyc188208"
|
|
- name: MYSQL_DATABASE
|
|
value: "devperf"
|
|
# Gitea
|
|
- name: GITEA_BASE_URL
|
|
value: "https://gitea.airlabs.art"
|
|
- name: GITEA_API_TOKEN
|
|
value: "5d37e09cab2735055f3fc1498931206f666f0539"
|
|
- name: GITEA_ORG
|
|
value: "zyc"
|
|
# CORS
|
|
- name: CORS_ORIGINS
|
|
value: "https://devperf.airlabs.art"
|
|
# AI (豆包 Doubao / 火山引擎 Ark)
|
|
- name: AI_ENABLED
|
|
value: "true"
|
|
- name: AI_API_KEY
|
|
value: "846b6981-9954-4c58-bb39-63079393bdb8"
|
|
- name: AI_MODEL
|
|
value: "doubao-seed-2-0-pro-260215"
|
|
- name: AI_BASE_URL
|
|
value: "https://ark.cn-beijing.volces.com/api/v3"
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /api/health
|
|
port: 3200
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 10
|
|
timeoutSeconds: 3
|
|
failureThreshold: 3
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /api/health
|
|
port: 3200
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 5
|
|
timeoutSeconds: 3
|
|
failureThreshold: 3
|
|
resources:
|
|
requests:
|
|
memory: "128Mi"
|
|
cpu: "100m"
|
|
limits:
|
|
memory: "512Mi"
|
|
cpu: "500m"
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: devperf-backend
|
|
spec:
|
|
selector:
|
|
app: devperf-backend
|
|
ports:
|
|
- protocol: TCP
|
|
port: 3200
|
|
targetPort: 3200
|