UI-UX/k8s/web-deployment.yaml
zyc c19b3b7b05
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 6m41s
ci: add CI/CD pipeline for cyberstar.airlabs.art
- Dockerfile: multi-stage Next.js standalone build with pnpm + prisma
- k8s manifests: single web deployment + Traefik ingress + LE TLS
- Gitea workflow: build/push to Volcano CR, deploy to K3s, log-center failure reporting
- next.config: enable standalone output for slim container image

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 13:44:04 +08:00

76 lines
1.7 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.

apiVersion: apps/v1
kind: Deployment
metadata:
name: cyberstar-web
labels:
app: cyberstar-web
spec:
replicas: 1
selector:
matchLabels:
app: cyberstar-web
template:
metadata:
labels:
app: cyberstar-web
spec:
imagePullSecrets:
- name: cr-pull-secret
containers:
- name: cyberstar-web
image: ${CI_REGISTRY_IMAGE}/cyberstar-web:latest
imagePullPolicy: Always
ports:
- containerPort: 3000
env:
- name: NODE_ENV
value: "production"
- name: PORT
value: "3000"
- name: HOSTNAME
value: "0.0.0.0"
- name: AUTH_URL
value: "https://cyberstar.airlabs.art"
- name: AUTH_TRUST_HOST
value: "true"
# 敏感配置 / 第三方凭据从 Secret 注入(部署前需 kubectl create secret generic cyberstar-env --from-env-file=.env
envFrom:
- secretRef:
name: cyberstar-env
optional: true
livenessProbe:
httpGet:
path: /
port: 3000
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
readinessProbe:
httpGet:
path: /
port: 3000
initialDelaySeconds: 10
periodSeconds: 5
timeoutSeconds: 3
failureThreshold: 3
resources:
requests:
memory: "256Mi"
cpu: "200m"
limits:
memory: "1024Mi"
cpu: "1000m"
---
apiVersion: v1
kind: Service
metadata:
name: cyberstar-web
spec:
selector:
app: cyberstar-web
ports:
- protocol: TCP
port: 80
targetPort: 3000