[General] AppName = "haibei" 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 = ":8070" 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 = "36.133.78.46:6379" Username = "" Password = "123456" DB = 0 [Storage.DB] Debug = true Type = "mysql" # sqlite3/mysql/postgres # SQLite3 DSN #DSN = "data/haibei.db" # MySQL DSN DSN = "haibei:haibei@tcp(36.133.78.46:3306)/haibei?charset=utf8mb4&parseTime=True&loc=Local" # PostgreSQL DSN # DSN = "host=db user=postgres password=123456 dbname=haibei 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 = "36.133.78.46: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"