MSP-623 update config
This commit is contained in:
1 parent
a7feb4e234
commit
2863f95a97
6 files changed
+49
-42
No files matched your search
@@ -9,3 +9,9 @@ grpcInnerAddress:
|
||||
port: 9005
|
||||
moduleName: system
|
||||
instanceUuid: 3f4faf30-8482-48ef-931a-b15575a3af1d
|
||||
|
||||
logfile:
|
||||
path: /var/log/isp-system-service/runtime.log
|
||||
maxSizeMb: 512
|
||||
maxBackups: 4
|
||||
compress: true
|
||||
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"logLevel": "debug",
|
||||
"database": {
|
||||
"address": "127.0.0.1",
|
||||
"port": "5432",
|
||||
"schema": "system_service",
|
||||
"database": "name",
|
||||
"username": "name",
|
||||
"password": "password",
|
||||
"createSchema": true
|
||||
"schema": "mdm_service",
|
||||
"database": "{{ msp_pgsql_name }}",
|
||||
"password": "{{ msp_pgsql_password }}",
|
||||
"username": "{{ msp_pgsql_user }}",
|
||||
"host": "{{ msp_pgsql_address }}",
|
||||
"port": 5432
|
||||
},
|
||||
"redis": {
|
||||
"address": {
|
||||
@@ -15,14 +15,5 @@
|
||||
},
|
||||
"defaultDB": 0
|
||||
},
|
||||
"metrics": {
|
||||
"gc": true,
|
||||
"memory": true,
|
||||
"address": {
|
||||
"ip": "0.0.0.0",
|
||||
"path": "/metrics",
|
||||
"port": "9555"
|
||||
}
|
||||
},
|
||||
"applicationSecret": "SECRET_ACCESS_KEY"
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package conf
|
||||
|
||||
import (
|
||||
"github.com/integration-system/isp-kit/bootstrap"
|
||||
)
|
||||
|
||||
type Local struct {
|
||||
*bootstrap.LocalConfig
|
||||
InstanceUuid string
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package conf
|
||||
|
||||
import (
|
||||
"github.com/integration-system/isp-lib/v2/config"
|
||||
"github.com/integration-system/isp-lib/v2/structure"
|
||||
)
|
||||
|
||||
type Configuration struct {
|
||||
config.CommonLocalConfig
|
||||
InstanceUuid string
|
||||
GrpcOuterAddress structure.AddressConfiguration `valid:"required~Required" json:"grpcOuterAddress"`
|
||||
GrpcInnerAddress structure.AddressConfiguration `valid:"required~Required" json:"grpcInnerAddress"`
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package conf
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
"github.com/integration-system/isp-kit/dbx"
|
||||
"github.com/integration-system/isp-kit/log"
|
||||
"github.com/integration-system/isp-kit/rc/schema"
|
||||
"github.com/integration-system/isp-lib/v2/structure"
|
||||
"github.com/integration-system/jsonschema"
|
||||
)
|
||||
|
||||
func init() {
|
||||
schema.CustomGenerators.Register("logLevel", func(field reflect.StructField, t *jsonschema.Type) {
|
||||
t.Type = "string"
|
||||
t.Enum = []interface{}{"debug", "info", "error", "fatal"}
|
||||
})
|
||||
}
|
||||
|
||||
type Remote struct {
|
||||
Database dbx.Config `schema:"Настройка базы данных"`
|
||||
LogLevel log.Level `schemaGen:"logLevel" schema:"Уровень логирования"`
|
||||
Redis structure.RedisConfiguration `schema:"Настройка Redis" valid:"required~Required"`
|
||||
DefaultTokenExpireTime int `schema:"Время жизни токена по умолчанию,время жизни токена в миллисекундах с момента его создания. если = -1 - время жизни неограниченно"`
|
||||
ApplicationSecret string `schema:"Ключ для подписи application токенов" valid:"required~Required"`
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package conf
|
||||
|
||||
import (
|
||||
"github.com/integration-system/isp-lib/v2/structure"
|
||||
)
|
||||
|
||||
type RemoteConfig struct {
|
||||
Database structure.DBConfiguration `schema:"Настройка базы данных"`
|
||||
Redis structure.RedisConfiguration `schema:"Настройка Redis" valid:"required~Required"`
|
||||
DefaultTokenExpireTime int64 `schema:"Время жизни токена по умолчанию,время жизни токена в миллисекундах с момента его создания. если = -1 - время жизни неограниченно"`
|
||||
Metrics structure.MetricConfiguration `schema:"Настройка метрик"`
|
||||
ApplicationSecret string `schema:"Ключ для подписи application токенов" valid:"required~Required"`
|
||||
}
|
||||
Reference in new issue
Block a user