update config
This commit is contained in:
parent
f305bc6ce6
commit
1ba6412b24
@ -8,10 +8,10 @@ REDIS_PASS=
|
||||
JWKS_URL=https://auth.leaflow.cn/realms/Ecosystem/protocol/openid-connect/certs
|
||||
|
||||
S3_ENDPOINT=
|
||||
S3_ACCESS_KEY=
|
||||
S3_SECRET_KEY=
|
||||
S3_ACCESS_KEY_ID=
|
||||
S3_SECRET_ACCESS_KEY=
|
||||
S3_BUCKET=
|
||||
S3_USE_SSL=false
|
||||
S3_USE_SSL=true
|
||||
|
||||
DEBUG=false
|
||||
|
||||
|
@ -32,6 +32,14 @@ type defaultConfig struct {
|
||||
DebugMode struct {
|
||||
Enable bool
|
||||
}
|
||||
|
||||
S3 struct {
|
||||
Endpoint string
|
||||
Bucket string
|
||||
AccessKeyID string
|
||||
SecretAccessKey string
|
||||
UseSSL bool
|
||||
}
|
||||
}
|
||||
|
||||
var Config = defaultConfig{}
|
||||
|
@ -17,6 +17,11 @@ func InitConfig() {
|
||||
Config.ListenAddr.HTTP = GetEnv("HTTP_LISTEN_ADDR")
|
||||
Config.JWKS.Url = GetEnv("JWKS_URL")
|
||||
Config.DebugMode.Enable = GetEnv("DEBUG", "false") == "true"
|
||||
Config.S3.Endpoint = GetEnv("S3_ENDPOINT")
|
||||
Config.S3.Bucket = GetEnv("S3_BUCKET")
|
||||
Config.S3.AccessKeyID = GetEnv("S3_ACCESS_KEY_ID")
|
||||
Config.S3.SecretAccessKey = GetEnv("S3_SECRET_ACCESS_KEY")
|
||||
Config.S3.UseSSL = GetEnv("S3_USE_SSL", "true") == "true"
|
||||
|
||||
dsn := dsnparser.Parse(Config.DB.DSN)
|
||||
var dsn2 = ""
|
||||
|
Loading…
Reference in New Issue
Block a user