Files
life-echo/api/.env.production
iammm0 d104377d26 feat: 优化Docker构建配置,支持生产环境配置文件
- 更新.gitignore,允许.env.production文件被提交(私密仓库)
- 优化Dockerfile构建流程,使用.env.production作为生产环境配置
- 将.env.production复制为.env,确保生产环境使用正确的配置
- 新增.env.production生产环境配置文件
2026-01-23 10:56:59 +08:00

32 lines
1.5 KiB
Plaintext
Raw 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.
# DeepSeek API 配置(推荐,优先使用)
DEEPSEEK_API_KEY=sk-09f17fb61c5a4299a3afc2a01de7af75
DEEPSEEK_BASE_URL=https://api.deepseek.com
DEEPSEEK_MODEL=deepseek-chat
# =============================================================================
# 数据库配置(必需)
# =============================================================================
# PostgreSQL 数据库连接 URL
# 格式: postgresql://用户名:密码@主机:端口/数据库名
DATABASE_URL=postgresql://postgres:postgres@postgresql:5432/life_echo
# =============================================================================
# Redis 配置(必需)
# =============================================================================
# Redis 连接 URL
# 格式: redis://[:密码@]主机:端口[/数据库编号]
REDIS_URL=redis://redis:6379/0
# Redis 会话过期时间(可选,默认: 86400 秒,即 24 小时)
REDIS_SESSION_TTL=86400
# =============================================================================
# 认证配置(必需)
# =============================================================================
# JWT 签名密钥(必需)
# 建议使用随机生成的强密钥,例如: openssl rand -hex 32
# 生产环境必须更换为强随机字符串
SECRET_KEY=cf47555c7ecbe5ddb7fd2113c59e08a8bcb110810c42f7c644e06a5acc898608
# JWT 算法(可选,默认: HS256
ALGORITHM=HS256
# 访问令牌过期时间(可选,默认: 120 分钟,即 2 小时)
ACCESS_TOKEN_EXPIRE_MINUTES=120