wp-go/config.example.yaml
2023-02-01 00:58:42 +08:00

88 lines
1.9 KiB
YAML
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.

mysql:
dsn:
host: localhost
port: 3306
db: wordpress
user: root
password: root
charset: utf8mb4
pool:
# 最长空闲时间
connMaxIdleTime: 60
# 最大连接数
maxOpenConn: 100
# 最大空闲连接数
maxIdleConn: 10
# 连接的生命时长
connMaxLifetime: 236
Mail:
user: xx@163.com
alias: xx
pass:
Host: smtp.163.com
Port: 465
Ssl: true
ssl:
cert: ""
key: ""
# 最近文章缓存时间
recentPostCacheTime: 5m
# 分类缓存时间
categoryCacheTime: 5m
# 上下篇缓存时间
contextPostCacheTime: 10h
# 最近评论缓存时间
recentCommentsCacheTime: 5m
# 摘要缓存时间
digestCacheTime: 5m
# 摘要字数
digestWordCount: 300
# 文档列表id页缓存 包括默认列表、分类
postListCacheTime: 1h
# 搜索文档id缓存时间
searchPostCacheTime: 5m
# 月归档文章id缓存时间
monthPostCacheTime: 1h
# 文档数据缓存时间
postDataCacheTime: 1h
# 文章评论缓存时间
postCommentsCacheTime: 5m
# 定时清理缓存周期时间
crontabClearCacheTime: 5m
# 到达指定并发请求数时随机sleep
maxRequestSleepNum: 100
# 随机sleep时间
sleepTime: [1s,3s]
# 全局最大请求数超过直接403
maxRequestNum: 500
# 单ip同时最大搜索请求数
singleIpSearchNum: 10
# 文档最大id缓存时间
maxPostIdCacheTime: 1h
# 用户信息缓存时间
userInfoCacheTime: 24h
# 单独评论缓存时间
commentsCacheTime: 24h
# 主题的页眉图片缓存时间
themeHeaderImagCacheTime: 5m
# Gzip
gzip: false
# 提交评论url
postCommentUrl: http://wp.test/wp-comments-post.php
# TrustIps
trustIps: []
# trust servername 信任的域名
trustServerNames: ["xy.test","blog.xy.test"]
# port
port: 8082
# 主题 为空值为option template没有就默认为twentyfifteen
theme: "twentyfifteen"
# 文档排序默认升序还是降序
postOrder: "desc"
# 上传的目录
uploadDir: ""
# pprof route path 为空表示不开启pprof,否则为pprof的路由
pprof: "/debug/pprof"