ifms_go/configs/dev/server.toml

95 lines
2.0 KiB
TOML

[General]
AppName = "ifms"
Version = "v10.1.0"
Debug = true
PprofAddr = "" # Pprof monitor address, "localhost:6060"
DisableSwagger = false
DisablePrintConfig = false
DefaultLoginPwd = "6351623c8cef86fefabfa7da046fc619" # MD5("abc-123")
MenuFile = "menu.json" # Or use "menu_cn.json"
DenyOperateMenu = true
TraceCodeUrlBase = "http://118.178.59.140:8888"
[General.HTTP]
Addr = ":8040"
ShutdownTimeout = 10
ReadTimeout = 300
WriteTimeout = 300
IdleTimeout = 10
CertFile = ""
KeyFile = ""
[General.Root] # Super Administrator Account
ID = 1
Username = "admin"
Password = "6351623c8cef86fefabfa7da046fc619" # MD5("abc-123")
Name = "Admin"
[Storage]
[Storage.Cache]
Type = "redis" # memory/badger/redis
Delimiter = ":"
[Storage.Cache.Memory]
CleanupInterval = 60
[Storage.Cache.Badger]
Path = "data/cache"
[Storage.Cache.Redis]
Addr = "r-bp138odqmhiz1us5g0pd.redis.rds.aliyuncs.com:6379"
Username = ""
Password = "adminQK123"
DB = 1
[Storage.DB]
Debug = true
Type = "mysql" # sqlite3/mysql/postgres
# SQLite3 DSN
# DSN = "data/ifms.db"
# MySQL DSN
DSN = "qkkj123:adminQK123@tcp(rm-bp100beq16e21f3684o.mysql.rds.aliyuncs.com:3306)/ifms?charset=utf8mb4&parseTime=True&loc=Local"
# PostgreSQL DSN
# DSN = "host=db user=postgres password=123456 dbname=ifms port=5432 sslmode=disable TimeZone=Asia/Shanghai"
MaxLifetime = 86400
MaxIdleTime = 3600
MaxOpenConns = 100
MaxIdleConns = 50
TablePrefix = ""
AutoMigrate = false
[Util]
[Util.Captcha]
Length = 4
Width = 400
Height = 160
CacheType = "redis" # memory/redis
[Util.Captcha.Redis]
Addr = "" # If empty, then use the same configuration as Storage.Cache.Redis
Username = ""
Password = ""
DB = 1
KeyPrefix = "captcha:"
[Util.Prometheus]
Enable = false
Port = 9100
BasicUsername = "admin"
BasicPassword = "admin"
LogApis = [] # Log APIs, e.g. ["/api/v1/users"]
LogMethods = [] # Log HTTP methods, e.g. ["GET"]
DefaultCollect = true
[Dictionary]
UserCacheExp = 4 # hours
[AliyunOSS]
Endpoint = "oss-cn-hangzhou.aliyuncs.com"
AccessKeyID = "LTAI5tMPLyvmGn44W6tEUzn9"
AccessKeySecret = "YgPynRZB73nl6JbnwZg0kqZhsEpA1v"
Bucket = "qkkj-ifms-test"