-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathconfig.container.yaml
44 lines (40 loc) · 1.49 KB
/
config.container.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# 基础 http 配置
server:
name: uniTranslate
address: "0.0.0.0:9431"
cacheMode: redis # redis , mem , off 模式 mem 会将翻译结果存储到程序内存中 模式 off 不写入任何缓存
cachePlatform: true # 执行缓存key生成是否包含平台 (会影响项目启动时自动初始化存储的key)
cacheRefreshOnStartup: false # 启动时是否从数据库刷新缓存 (会先清除缓存里所有的 缓存 在从数据库逐条初始化 数据 慎用!!!)
key: "123456" # http api 对接时的密钥
keyMode: 1 # 模式 1 直接传入 key 做验证 模式 2 使用 key 加密加签数据进行验证
configDeviceMode: "xdb" # xdb 内置数据库 mysql 使用 MySQL 作为配置存储引擎
recordDeviceMode: "mysql" # 支持 mysql 和 sqlite
configDeviceDb: "default" # 翻译配置的数据库设置
cacheWriteToStorage: true # 是否将缓存写入到数据库
requestRecordKeepDays: 7 # 请求记录保留天数
apiEditConfig: true # 是否开启 api 修改配置
# 数据库
database:
default:
type: "mysql"
link: "root:jsnSvEEdb4as9v@tcp(mysql:3306)/uni_translate?charset=utf8mb4&parseTime=true&loc=Local"
createdAt: "createTime"
updatedAt: "updateTime"
debug: true
# redis
redis:
default:
address: redis:6379
db: 0
pass: "sGQsTh3DHrj8Yq"
# 日志
logger:
path: "./log/default"
level: "all"
stdout: false
writerColorEnable: true
# GrayLog 支持
graylog:
open: false
host:
port: