90 lines
1.9 KiB
TOML
90 lines
1.9 KiB
TOML
[General]
|
|
AppName = "jinshan_community"
|
|
Version = "v10.1.0"
|
|
Debug = true
|
|
PprofAddr = "" # Pprof monitor address, "localhost:6060"
|
|
DisableSwagger = false
|
|
DisablePrintConfig = false
|
|
DefaultLoginPwd = "6351623c8cef86fefabfa7da046fc619" # MD5("abc-123")
|
|
MenuFile = "menu_cn.json" # Or use "menu_cn.json"
|
|
DenyOperateMenu = false
|
|
|
|
[General.HTTP]
|
|
Addr = ":8071"
|
|
ShutdownTimeout = 10
|
|
ReadTimeout = 60
|
|
WriteTimeout = 60
|
|
IdleTimeout = 10
|
|
CertFile = ""
|
|
KeyFile = ""
|
|
|
|
[General.Root] # Super Administrator Account
|
|
ID = "root"
|
|
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 = "115.239.217.220:6379"
|
|
Username = ""
|
|
Password = "123456"
|
|
DB = 6
|
|
|
|
[Storage.DB]
|
|
Debug = true
|
|
Type = "mysql" # sqlite3/mysql/postgres
|
|
# SQLite3 DSN
|
|
#DSN = "data/jinshan_community.db"
|
|
# MySQL DSN
|
|
DSN = "jinshan:jinshan@tcp(115.239.217.220:3306)/jinshan?charset=utf8mb4&parseTime=True&loc=Local"
|
|
# PostgreSQL DSN
|
|
# DSN = "host=db user=postgres password=123456 dbname=jinshan_community port=5432 sslmode=disable TimeZone=Asia/Shanghai"
|
|
MaxLifetime = 86400
|
|
MaxIdleTime = 3600
|
|
MaxOpenConns = 100
|
|
MaxIdleConns = 50
|
|
TablePrefix = ""
|
|
AutoMigrate = true
|
|
|
|
[Util]
|
|
|
|
[Util.Captcha]
|
|
Length = 4
|
|
Width = 400
|
|
Height = 160
|
|
CacheType = "memory" # memory/redis
|
|
|
|
[Util.Captcha.Redis]
|
|
Addr = "115.239.217.220:6379" # If empty, then use the same configuration as Storage.Cache.Redis
|
|
Username = ""
|
|
Password = "123456"
|
|
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
|
|
[FileConfig]
|
|
UploadDir = "./uploads"
|
|
StaticPrefix = "/static"
|