添加 Docker 和 CI/CD 配置(无 SSH 方案)
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Failing after 0s

This commit is contained in:
2026-01-19 14:56:40 +08:00
parent a6940e78df
commit 589197e284
10 changed files with 1000 additions and 42 deletions

View File

@@ -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天