feat: 完善后端脚手架基础能力
This commit is contained in:
+17
-3
@@ -17,17 +17,21 @@ logger:
|
||||
compress: false
|
||||
|
||||
database:
|
||||
driver: "postgres" # postgres, mysql, sqlite
|
||||
dsn: "" # 可选;填写后覆盖下方自动拼接的连接参数
|
||||
host: "127.0.0.1"
|
||||
port: 2000
|
||||
port: 0 # 0 表示按 driver 使用默认端口
|
||||
username: "root"
|
||||
password: "123456"
|
||||
dbname: "skeleton"
|
||||
sslmode: "disable"
|
||||
max_idle_conns: 10
|
||||
max_open_conns: 100
|
||||
sqlite_path: "data/skeleton.db"
|
||||
max_idle_conns: 0 # 0 表示使用 driver 默认值
|
||||
max_open_conns: 0 # SQLite 默认 1,服务端数据库默认 100
|
||||
conn_max_lifetime: 60
|
||||
|
||||
redis:
|
||||
enabled: false
|
||||
host: "127.0.0.1"
|
||||
port: 2001
|
||||
password: "123456"
|
||||
@@ -39,4 +43,14 @@ redis:
|
||||
jwt:
|
||||
secret: "change-this-secret-key-in-production"
|
||||
expire_hours: 24
|
||||
access_expire_minutes: 15
|
||||
refresh_expire_hours: 168
|
||||
issuer: "HeTianXia"
|
||||
|
||||
observability:
|
||||
metrics_enabled: true
|
||||
metrics_path: "/metrics"
|
||||
tracing_enabled: false
|
||||
tracing_service: "skeleton"
|
||||
tracing_endpoint: "localhost:4318"
|
||||
tracing_insecure: true
|
||||
|
||||
Reference in New Issue
Block a user