Files
nl_cms-api/hack/config.yaml
2025-07-29 12:45:07 +08:00

59 lines
1.1 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 服务配置
server:
address: ":8080"
serverRoot: "resource/public"
indexFiles: ["index.html"]
accessLogEnabled: true
errorLogEnabled: true
pprofEnabled: true
# 数据库配置
database:
default:
host: "127.0.0.1"
port: "3306"
user: "root"
pass: "root"
name: "cc_cms_gf"
type: "mysql"
role: "master"
debug: true
prefix: ""
dryRun: false
maxIdle: 10
maxOpen: 100
maxLifetime: "30s"
# Redis配置
redis:
default:
address: "127.0.0.1:6379"
db: 0
pass: ""
maxIdle: 10
maxActive: 100
idleTimeout: "60s"
maxConnLifetime: "60s"
# JWT配置
jwt:
signingKey: "cms_jwt_signing_key_2024"
expire: 7200 # 2小时单位秒
# 日志配置
logger:
path: "storage/logs"
level: "all"
stdout: true
rotateSize: "100M"
rotateExpire: "7d"
rotateBackupLimit: 10
rotateBackupExpire: "30d"
rotateBackupCompress: 9
rotateCheckInterval: "1h"
# 文件上传配置
upload:
path: "storage/uploads"
maxSize: "10M"
allowedTypes: ["jpg", "jpeg", "png", "gif", "pdf", "doc", "docx", "xls", "xlsx", "ppt", "pptx", "zip", "rar"]