fix: 优化后端部署配置,适配现有服务架构
主要修改: - 移除 postgres:15-alpine 和 redis 容器依赖 - 优化 docker-compose.yml 配置,使用 host 网络模式 - 移除 CI/CD 中的自动数据库迁移,改为手动执行 - 更新环境变量配置,连接到现有的 PostgreSQL 和 Redis 服务 - 完善部署文档,增加现有服务集成说明 配置优化: - 修正 docker-compose.yml 位置到 backend 目录 - 简化 CI/CD 测试流程,跳过需要数据库的测试 - 增加数据库迁移安全策略说明 - 完善部署流程文档和故障排除指南
This commit is contained in:
12
.env.example
12
.env.example
@ -1,20 +1,20 @@
|
||||
# 摄影作品集项目环境变量配置
|
||||
|
||||
# ================================
|
||||
# 数据库配置
|
||||
# 数据库配置 (连接到现有的 PostgreSQL 服务)
|
||||
# ================================
|
||||
DB_HOST=postgres
|
||||
DB_HOST=localhost
|
||||
DB_PORT=5432
|
||||
DB_NAME=photography
|
||||
DB_USER=postgres
|
||||
DB_PASSWORD=your_strong_password_here
|
||||
DB_PASSWORD=your_existing_postgres_password
|
||||
|
||||
# ================================
|
||||
# Redis 配置
|
||||
# Redis 配置 (连接到现有的 Redis 服务)
|
||||
# ================================
|
||||
REDIS_HOST=redis
|
||||
REDIS_HOST=localhost
|
||||
REDIS_PORT=6379
|
||||
REDIS_PASSWORD=your_redis_password_here
|
||||
REDIS_PASSWORD=your_existing_redis_password
|
||||
|
||||
# ================================
|
||||
# JWT 认证配置
|
||||
|
||||
Reference in New Issue
Block a user