简化API节点的数据库配置(db.yaml)

This commit is contained in:
GoEdgeLab
2024-05-06 17:31:08 +08:00
parent 40ad9d2931
commit ff89e036d4
8 changed files with 159 additions and 80 deletions

View File

@@ -1,2 +1,3 @@
api.yaml
db.yaml
db.yaml
.db.yaml

View File

@@ -1,16 +1,4 @@
default:
db: "prod"
prefix: ""
dbs:
prod:
driver: "mysql"
dsn: "root:123456@tcp(127.0.0.1:3306)/db_edge?charset=utf8mb4&timeout=30s"
prefix: "edge"
models:
package: internal/web/models
fields:
bool: [ "uamIsOn", "followPort", "requestHostExcludingPort", "autoRemoteStart", "autoInstallNftables", "enableIPLists", "detectAgents", "checkingPorts", "enableRecordHealthCheck", "offlineIsNotified", "http2Enabled", "http3Enabled", "enableHTTP2", "retry50X", "retry40X", "autoSystemTuning", "disableDefaultDB", "autoTrimDisks","enableGlobalPages" ]
user: root
password: 123456
host: 127.0.0.1:3306
database: db_edge