添加 Docker 和 CI/CD 配置(无 SSH 方案)
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Failing after 0s
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Failing after 0s
This commit is contained in:
@@ -37,56 +37,29 @@ queue:
|
||||
timeout: "10m"
|
||||
|
||||
logging:
|
||||
level: "info"
|
||||
development: false
|
||||
level: "debug" # 开发环境使用 debug 级别
|
||||
development: true # 启用开发模式(美化日志输出)
|
||||
app_log:
|
||||
filename: "logs/app.log"
|
||||
max_size: 100 # MB
|
||||
max_backups: 30
|
||||
max_age: 30 # 天
|
||||
compress: true
|
||||
max_size: 100
|
||||
max_backups: 10 # 开发环境保留较少备份
|
||||
max_age: 7 # 7天
|
||||
compress: false # 开发环境不压缩
|
||||
access_log:
|
||||
filename: "logs/access.log"
|
||||
max_size: 500 # MB
|
||||
max_backups: 90
|
||||
max_age: 90 # 天
|
||||
compress: true
|
||||
max_size: 100
|
||||
max_backups: 10
|
||||
max_age: 7
|
||||
compress: false
|
||||
|
||||
middleware:
|
||||
# 认证中间件开关
|
||||
enable_auth: true
|
||||
|
||||
# 限流中间件开关(默认禁用,按需启用)
|
||||
enable_rate_limiter: false
|
||||
|
||||
# 限流器配置
|
||||
enable_auth: true # 开发环境可选禁用认证
|
||||
enable_rate_limiter: true
|
||||
rate_limiter:
|
||||
# 每个时间窗口允许的最大请求数
|
||||
# 建议值:
|
||||
# - 公开 API(严格): 60-100
|
||||
# - 公开 API(宽松): 1000-5000
|
||||
# - 内部 API: 5000-10000
|
||||
max: 100
|
||||
|
||||
# 时间窗口(限流重置周期)
|
||||
# 支持格式:
|
||||
# - "30s" (30秒)
|
||||
# - "1m" (1分钟,推荐)
|
||||
# - "5m" (5分钟)
|
||||
# - "1h" (1小时)
|
||||
max: 1000
|
||||
expiration: "1m"
|
||||
storage: "redis"
|
||||
|
||||
# 限流存储方式
|
||||
# 选项:
|
||||
# - "memory": 内存存储(单机部署,快速,重启后重置)
|
||||
# - "redis": Redis存储(分布式部署,持久化,跨服务器共享)
|
||||
# 建议:
|
||||
# - 开发/测试环境:使用 "memory"
|
||||
# - 生产环境(单机):使用 "memory"
|
||||
# - 生产环境(多机):使用 "redis"
|
||||
storage: "memory"
|
||||
|
||||
# 短信服务配置
|
||||
sms:
|
||||
gateway_url: "https://gateway.sms.whjhft.com:8443/sms"
|
||||
username: "JH0001" # TODO: 替换为实际的短信服务账号
|
||||
@@ -96,7 +69,7 @@ sms:
|
||||
|
||||
# JWT 配置
|
||||
jwt:
|
||||
secret_key: "your-secret-key-change-this-in-production" # TODO: 生产环境必须修改
|
||||
secret_key: "dev-secret-key-for-testing-only-32chars!"
|
||||
token_duration: "168h" # C 端个人客户 JWT Token 有效期(7天)
|
||||
access_token_ttl: "24h" # B 端访问令牌有效期(24小时)
|
||||
refresh_token_ttl: "168h" # B 端刷新令牌有效期(7天)
|
||||
|
||||
Reference in New Issue
Block a user