[General] AppName = "hailinservice" 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 = false [General.HTTP] Addr = ":8060" 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 = "memory" # memory/badger/redis Delimiter = ":" [Storage.Cache.Memory] CleanupInterval = 60 [Storage.Cache.Badger] Path = "data/cache" [Storage.Cache.Redis] Addr = "127.0.0.1:6379" Username = "" Password = "" DB = 1 [Storage.DB] Debug = true Type = "mysql" # sqlite3/mysql/postgres # SQLite3 DSN #DSN = "data/hailinservice.db" # MySQL DSN DSN = "hailin:z2askDphamsxk5BH@tcp(115.239.217.220:3306)/hailin?charset=utf8mb4&parseTime=True&loc=Local" # PostgreSQL DSN # DSN = "host=db user=postgres password=123456 dbname=hailinservice 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 = "" # 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 [FileConfig] UploadDir = "./uploads" StaticPrefix = "/static"