Files
john a400130c67
CI / api-test (push) Has been cancelled
CI / web-build (push) Has been cancelled
Sprint 6: report review workflow, CI/K8s, and client tabs.
Add coach review APIs, pose calibration thresholds, Gitea CI, Kubernetes skeleton, H5 practice page, and mini program tab bar.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-23 11:44:11 +08:00

35 lines
900 B
Markdown
Raw Permalink 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.
# Kubernetes 部署骨架(Sprint 6
## 前置
- 集群已安装 Ingress Controller
- 镜像推送到私有 Registry
- MySQL / Redis / MinIO 可用(云 RDS 或集群内 Helm)
## 部署
```bash
# 1. 创建 Secret(勿提交明文)
kubectl create secret generic happy-up-api-secret \
--from-literal=DATABASE_URL='mysql+pymysql://...' \
--from-literal=REDIS_URL='redis://...' \
--from-literal=JWT_SECRET='...' \
--from-literal=OSS_ACCESS_KEY='...' \
--from-literal=OSS_SECRET_KEY='...'
# 2. 应用清单
kubectl apply -f deploy/k8s/api.yaml
# 3. 验证
kubectl rollout status deployment/happy-up-api
curl https://api.happy-up.example.com/health
```
## Worker
分析 Worker 可单独 Deployment,环境变量与 API 相同,`command: ["python", "-m", "app.worker"]`
## CI
Gitea Actions 见 `.gitea/workflows/ci.yaml`,推送 main 自动跑 API 测试与 Web 构建。