docs: 更新 .env.example 注释,兼容本地开发和 Docker 部署
- DATABASE_URL: 添加注释说明 localhost(本地) vs 容器名(Docker) - REDIS_HOST: 同上 - CORS_ORIGINS: 添加注释说明不同环境的配置差异
This commit is contained in:
@@ -11,9 +11,13 @@ HOST=0.0.0.0
|
||||
PORT=8000
|
||||
|
||||
# === 数据库配置 ===
|
||||
# 本地开发: localhost
|
||||
# Docker 部署: 容器名(如 db、meijiaka-db)
|
||||
DATABASE_URL=postgresql+asyncpg://postgres:postgres@localhost:5432/meijiaka_zj
|
||||
|
||||
# === Redis 配置 ===
|
||||
# 本地开发: localhost
|
||||
# Docker 部署: 容器名(如 redis、meijiaka-redis)
|
||||
REDIS_HOST=localhost
|
||||
REDIS_PORT=6379
|
||||
REDIS_DB=1
|
||||
@@ -26,6 +30,8 @@ ACCESS_TOKEN_EXPIRE_MINUTES=10080
|
||||
ALGORITHM=HS256
|
||||
|
||||
# === CORS 配置 ===
|
||||
# 本地开发: 允许 localhost
|
||||
# 测试/生产服: 填写实际域名,如 https://app.yourdomain.com
|
||||
CORS_ORIGINS=http://localhost:1420,http://127.0.0.1:1420,http://localhost:8080
|
||||
|
||||
# === AI 平台配置 ===
|
||||
|
||||
Reference in New Issue
Block a user