apiVersion: apps/v1 kind: Deployment metadata: name: video-backend labels: app: video-backend spec: replicas: 1 selector: matchLabels: app: video-backend template: metadata: labels: app: video-backend spec: containers: - name: video-backend image: ${CI_REGISTRY_IMAGE}/video-backend:latest imagePullPolicy: Always ports: - containerPort: 8000 env: - name: USE_MYSQL value: "true" - name: DJANGO_DEBUG value: "False" - name: DJANGO_ALLOWED_HOSTS value: "*" - name: DJANGO_SECRET_KEY value: "video-huoshan-prod-secret-key-2026" # Database (Aliyun RDS) - name: DB_HOST value: "rm-7xv1uaw910558p1788o.mysql.rds.aliyuncs.com" - name: DB_NAME value: "video_auto" - name: DB_USER value: "ai_video" - name: DB_PASSWORD value: "JogNQdtrd3WY8CBCAiYfYEGx" - name: DB_PORT value: "3306" # CORS - name: CORS_ALLOWED_ORIGINS value: "https://video-huoshan-web.airlabs.art" livenessProbe: httpGet: path: /healthz/ port: 8000 initialDelaySeconds: 30 periodSeconds: 10 timeoutSeconds: 5 failureThreshold: 3 readinessProbe: httpGet: path: /healthz/ port: 8000 initialDelaySeconds: 15 periodSeconds: 5 timeoutSeconds: 3 failureThreshold: 3 resources: requests: memory: "256Mi" cpu: "250m" limits: memory: "1024Mi" cpu: "1000m" --- apiVersion: v1 kind: Service metadata: name: video-backend spec: selector: app: video-backend ports: - protocol: TCP port: 8000 targetPort: 8000