diff --git a/docker/n9eetc/server.conf b/docker/n9eetc/server.conf index 9984e198..781e2179 100644 --- a/docker/n9eetc/server.conf +++ b/docker/n9eetc/server.conf @@ -120,7 +120,9 @@ Password = "" # # db # DB = 0 -[Gorm] +[DB] +# postgres: host=%s port=%s user=%s dbname=%s password=%s sslmode=%s +DSN="root:1234@tcp(mysql:3306)/n9e_v5?charset=utf8mb4&parseTime=True&loc=Local&allowNativePasswords=true" # enable debug mode or not Debug = false # mysql postgres @@ -136,30 +138,6 @@ TablePrefix = "" # enable auto migrate or not EnableAutoMigrate = false -[MySQL] -# mysql address host:port -Address = "mysql:3306" -# mysql username -User = "root" -# mysql password -Password = "1234" -# database name -DBName = "n9e_v5" -# connection params -Parameters = "charset=utf8mb4&parseTime=True&loc=Local&allowNativePasswords=true" - -[Postgres] -# pg address host:port -Address = "postgres:5432" -# pg user -User = "root" -# pg password -Password = "1234" -# database name -DBName = "n9e_v5" -# ssl mode -SSLMode = "disable" - [Reader] # prometheus base url Url = "http://prometheus:9090" diff --git a/docker/n9eetc/webapi.conf b/docker/n9eetc/webapi.conf index 4240cf4e..d599485a 100644 --- a/docker/n9eetc/webapi.conf +++ b/docker/n9eetc/webapi.conf @@ -129,7 +129,9 @@ Password = "" # # db # DB = 0 -[Gorm] +[DB] +# postgres: host=%s port=%s user=%s dbname=%s password=%s sslmode=%s +DSN="root:1234@tcp(mysql:3306)/n9e_v5?charset=utf8mb4&parseTime=True&loc=Local&allowNativePasswords=true" # enable debug mode or not Debug = true # mysql postgres @@ -145,30 +147,6 @@ TablePrefix = "" # enable auto migrate or not EnableAutoMigrate = false -[MySQL] -# mysql address host:port -Address = "mysql:3306" -# mysql username -User = "root" -# mysql password -Password = "1234" -# database name -DBName = "n9e_v5" -# connection params -Parameters = "charset=utf8mb4&parseTime=True&loc=Local&allowNativePasswords=true" - -[Postgres] -# pg address host:port -Address = "postgres:5432" -# pg user -User = "root" -# pg password -Password = "1234" -# database name -DBName = "n9e_v5" -# ssl mode -SSLMode = "disable" - [[Clusters]] # Prometheus cluster name Name = "Default"