refactor: 统一 DB/Redis 配置为 DSN 模式 + 移除 Helm/K8s 部署

- DatabaseConfig: Host/Port/User/Password/Name/DBName/SSLMode → 单个 DSN 字段
- RedisConfig: Host/Port/Password/DB/URL → 单个 DSN 字段
- 环境变量: GOCHAT_DATABASE_* (7个) → GOCHAT_DATABASE_DSN, GOCHAT_REDIS_* (5个) → GOCHAT_REDIS_DSN
- validator.go: DSN URL 解析校验 (scheme + host)
- redis.go: redis.ParseURL(cfg.DSN) 直连
- 所有 docker-compose / CI / shell 脚本 / .env 同步更新
- 删除 deploy/helm/ 整个目录 (20个文件)
- CI 删除 helm-validate / deploy-staging / deploy-production 三个 job
- 文档同步更新 (README, 架构设计, PRD, 滚动升级)
This commit is contained in:
Rogee
2026-07-29 20:58:10 +08:00
parent 851ca7e372
commit 92f0d51375
46 changed files with 185 additions and 1464 deletions
+2 -7
View File
@@ -40,12 +40,7 @@ services:
condition: service_healthy
environment:
- GOCHAT_ENV=test
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DATABASE=gochat_test
- REDIS_HOST=redis
- REDIS_PORT=6379
- GOCHAT_DATABASE_DSN=postgres://postgres:postgres@postgres:5432/gochat_test?sslmode=disable
- GOCHAT_REDIS_DSN=redis://redis:6379
- GOCHAT_JWT_SECRET=test_secret
command: ["test"]