All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 5s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
86 lines
2.5 KiB
YAML
86 lines
2.5 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: celery-worker
|
|
labels:
|
|
app: celery-worker
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: celery-worker
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: celery-worker
|
|
spec:
|
|
containers:
|
|
- name: celery-worker
|
|
image: ${CI_REGISTRY_IMAGE}/video-backend:latest
|
|
imagePullPolicy: Always
|
|
command: ["celery", "-A", "config", "worker", "--loglevel=info", "--concurrency=4", "-B"]
|
|
env:
|
|
- name: USE_MYSQL
|
|
value: "true"
|
|
- name: DJANGO_DEBUG
|
|
value: "False"
|
|
- name: DJANGO_ALLOWED_HOSTS
|
|
value: "*"
|
|
- name: DJANGO_SECRET_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: video-backend-secrets
|
|
key: DJANGO_SECRET_KEY
|
|
# Redis
|
|
- name: REDIS_URL
|
|
value: "redis://zyc:Zyc188208@redis-shzlsczo52dft8mia.redis.ivolces.com:6379/0"
|
|
# Database (Volcano Engine RDS - 默认测试环境,生产环境通过 CI 替换)
|
|
- name: DB_HOST
|
|
value: "mysql8351f937d637.rds.ivolces.com"
|
|
- name: DB_NAME
|
|
value: "video_auto"
|
|
- name: DB_USER
|
|
value: "zyc"
|
|
- name: DB_PASSWORD
|
|
value: "Zyc188208"
|
|
- name: DB_PORT
|
|
value: "3306"
|
|
# TOS (from Secret)
|
|
- name: TOS_ACCESS_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: video-backend-secrets
|
|
key: TOS_ACCESS_KEY
|
|
- name: TOS_SECRET_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: video-backend-secrets
|
|
key: TOS_SECRET_KEY
|
|
- name: TOS_BUCKET
|
|
value: "airdrama-media"
|
|
- name: TOS_ENDPOINT
|
|
value: "https://tos-cn-beijing.volces.com"
|
|
- name: TOS_REGION
|
|
value: "cn-beijing"
|
|
- name: TOS_CDN_DOMAIN
|
|
value: "https://airdrama-media.tos-cn-beijing.volces.com"
|
|
# Seedance API (from Secret)
|
|
- name: ARK_API_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: video-backend-secrets
|
|
key: ARK_API_KEY
|
|
- name: ARK_ENDPOINT_SEEDANCE
|
|
value: "ep-m-20260315211214-z9dp6"
|
|
- name: ARK_ENDPOINT_SEEDANCE_FAST
|
|
value: "ep-m-20260329211530-68999"
|
|
- name: SEEDANCE_ENABLED
|
|
value: "true"
|
|
resources:
|
|
requests:
|
|
memory: "128Mi"
|
|
cpu: "100m"
|
|
limits:
|
|
memory: "512Mi"
|
|
cpu: "500m"
|