feat(架构): 完善基础架构设计
This commit is contained in:
31
config.yaml
31
config.yaml
@@ -1,4 +1,5 @@
|
||||
# TYAPI Server Configuration
|
||||
# 🎯 统一配置文件,包含所有默认配置值
|
||||
|
||||
app:
|
||||
name: "TYAPI Server"
|
||||
@@ -24,6 +25,7 @@ database:
|
||||
max_open_conns: 25
|
||||
max_idle_conns: 10
|
||||
conn_max_lifetime: 300s
|
||||
auto_migrate: true
|
||||
|
||||
redis:
|
||||
host: "localhost"
|
||||
@@ -44,29 +46,44 @@ cache:
|
||||
|
||||
logger:
|
||||
level: "info"
|
||||
format: "json"
|
||||
format: "console"
|
||||
output: "stdout"
|
||||
file_path: "logs/app.log"
|
||||
max_size: 100
|
||||
max_backups: 3
|
||||
max_age: 7
|
||||
compress: true
|
||||
use_color: true
|
||||
|
||||
jwt:
|
||||
secret: "JwT8xR4mN9vP2sL7kH3oB6yC1zA5uF0qE9tW"
|
||||
secret: "default-jwt-secret-key-change-in-env-config"
|
||||
expires_in: 24h
|
||||
refresh_expires_in: 168h # 7 days
|
||||
refresh_expires_in: 168h
|
||||
|
||||
sms:
|
||||
access_key_id: "LTAI5tKGB3TVJbMHSoZN3yr9"
|
||||
access_key_secret: "OCQ30GWp4yENMjmfOAaagksE18bp65"
|
||||
endpoint_url: "dysmsapi.aliyuncs.com"
|
||||
sign_name: "天远数据"
|
||||
template_code: "SMS_474525324"
|
||||
code_length: 6
|
||||
expire_time: 5m
|
||||
mock_enabled: false
|
||||
rate_limit:
|
||||
daily_limit: 10
|
||||
hourly_limit: 5
|
||||
min_interval: 60s
|
||||
|
||||
ratelimit:
|
||||
requests: 100
|
||||
requests: 5000
|
||||
window: 60s
|
||||
burst: 50
|
||||
burst: 100
|
||||
|
||||
monitoring:
|
||||
metrics_enabled: true
|
||||
metrics_port: "9090"
|
||||
tracing_enabled: false
|
||||
tracing_endpoint: "http://localhost:14268/api/traces"
|
||||
tracing_enabled: true
|
||||
tracing_endpoint: "http://localhost:4317"
|
||||
sample_rate: 0.1
|
||||
|
||||
health:
|
||||
|
||||
Reference in New Issue
Block a user