Build & Push - 构建并推送镜像 / 构建后端镜像 (push) Failing after 0s
Build & Push - 构建并推送镜像 / 构建前端镜像 (push) Failing after 0s
Build & Push - 构建并推送镜像 / 构建通知 (push) Failing after 0s
CI - 代码检查和测试 / Python 代码检查 (push) Failing after 0s
CI - 代码检查和测试 / Python 单元测试 (push) Failing after 0s
CI - 代码检查和测试 / Frontend 代码检查 (push) Failing after 0s
CI - 代码检查和测试 / Frontend 构建测试 (push) Failing after 0s
This commit introduces a comprehensive DevOps infrastructure supporting local development, Docker Compose, and Kubernetes deployments. Features: - One-click local startup script (start_app.sh) * Auto Python 3.12 virtual environment management * Smart dependency installation with USTC pip mirror * Concurrent backend and frontend startup * Graceful shutdown with Ctrl+C - Docker deployment (docker-compose.prod.yml) * Multi-stage optimized Dockerfiles * Pull from localhost:5000 (business) and :5001 (base cache) * Complete service stack: Backend + Frontend + PostgreSQL + Redis + Nginx * Health checks and auto-restart - Kubernetes deployment (deploy_k8s.sh) * Full K8s configurations (8 YAML files) * ConfigMap/Secret management * HPA auto-scaling for backend * Ingress routing - CI/CD with Gitea Actions * Code quality checks (black, ruff, mypy) * Automated testing with coverage reports * Auto build and push images * Auto deploy to K8s dev/prod - Dependency caching * pip: USTC mirror (https://pypi.mirrors.ustc.edu.cn/simple/) * npm: Taobao mirror (https://registry.npmmirror.com) * Docker: localhost:5001 pull-through cache - Testing and notifications * HTML test reports * Code coverage visualization * QQ email notifications (38455629@qq.com) Documentation: - DEVOPS_SOLUTION.md: Complete architecture design - DEVOPS_QUICKSTART.md: Step-by-step guide - README_DEVOPS.md: DevOps overview - DEVOPS_FILES.md: File reference Total: 30+ configuration files and scripts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
29 lines
617 B
Bash
29 lines
617 B
Bash
# K8s 部署配置 - 开发环境
|
|
ENVIRONMENT=dev
|
|
VERSION=latest
|
|
DEBUG=false
|
|
|
|
# 域名配置
|
|
DOMAIN=localhost
|
|
|
|
# 数据库配置
|
|
DATABASE_NAME=template_dev
|
|
DATABASE_USER=postgres
|
|
DATABASE_PASSWORD=dev_postgres_password_change_this
|
|
|
|
# Redis 配置
|
|
REDIS_PASSWORD=
|
|
|
|
# 安全配置
|
|
SECRET_KEY=dev_secret_key_change_this_to_random_string
|
|
|
|
# 副本数量
|
|
BACKEND_REPLICAS=2
|
|
FRONTEND_REPLICAS=2
|
|
|
|
# 注意:
|
|
# 1. 开发环境可以使用简单的密码,但建议也使用强密码
|
|
# 2. SECRET_KEY 可以通过以下命令生成:
|
|
# openssl rand -hex 32
|
|
# 3. 不要将此文件提交到 Git(已在 .gitignore 中)
|