-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 增加docker-compose config.yaml文件
- Loading branch information
willem
committed
Dec 1, 2023
1 parent
d8c1d02
commit 2c0df3a
Showing
1 changed file
with
108 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
# 配置文件的键名命名方式统一使用小驼峰。 | ||
|
||
# HTTP Server. | ||
server: | ||
address: ":8200" | ||
serverRoot: "resource/public" | ||
dumpRouterMap: false | ||
routeOverWrite: true | ||
openapiPath: "/base-api/swagger/api.json" | ||
swaggerPath: "/swagger" | ||
NameToUriType: 3 | ||
maxHeaderBytes: "20KB" | ||
clientMaxBodySize: "50MB" | ||
# Logging配置 | ||
logPath: "resource/log/server" # 日志文件存储目录路径,建议使用绝对路径。默认为空,表示关闭 | ||
logStdout: true # 日志是否输出到终端。默认为true | ||
errorStack: true # 当Server捕获到异常时是否记录堆栈信息到日志中。默认为true | ||
errorLogEnabled: true # 是否记录异常日志信息到日志中。默认为true | ||
errorLogPattern: "error-{Ymd}.log" # 异常错误日志文件格式。默认为"error-{Ymd}.log" | ||
accessLogEnabled: true # 是否记录访问日志。默认为false | ||
accessLogPattern: "access-{Ymd}.log" # 访问日志文件格式。默认为"access-{Ymd}.log" | ||
https: false | ||
httpsCertFile: "" | ||
httpsKeyFile: "" | ||
|
||
# 数据库连接配置 | ||
database: | ||
logger: | ||
path: "resource/log/sql" | ||
level: "all" | ||
stdout: true | ||
ctxKeys: [ "RequestId" ] | ||
|
||
default: | ||
link: "mysql:root:DbyTYGu3s4WuAF4TTq7@tcp(mysql:3306)/sagoo_iot_open?loc=Local&parseTime=true" | ||
debug: false #开启调试模式 | ||
charset: "utf8mb4" #数据库编码(如: utf8/gbk/gb2312),一般设置为utf8 | ||
dryRun: false #ORM空跑(只读不写) | ||
maxIdle: 10 #连接池最大闲置的连接数 | ||
maxOpen: 10 #连接池最大打开的连接数 | ||
maxLifetime: 30 #(单位秒)连接对象可重复使用的时间长度 | ||
|
||
# dataCenter: | ||
# link: "mysql:zhgy_sagoo_cn:aRB75tn7NRpHDc6i@tcp(101.200.198.249:3306)/zhgy_sagoo_cn" | ||
# debug: true | ||
# charset: "utf8mb4" #数据库编码 | ||
# dryRun: false #ORM空跑(只读不写) | ||
# maxIdle: 10 #连接池最大闲置的连接数 | ||
# maxOpen: 10 #连接池最大打开的连接数 | ||
# maxLifetime: 30 #(单位秒)连接对象可重复使用的时间长度 | ||
|
||
# TDengine配置 | ||
tdengine: | ||
type: "taosRestful" #http连接方式,端口是6041 | ||
dsn: "root:taosdata@http(tdengine:6041)/" | ||
dbName: "sagoo_iot" | ||
maxOpenConns: 10 | ||
maxIdleConns: 5 | ||
|
||
# 采用原生的时候,需要将sagoo-admin/internal/logic/tdengine下的td_engine.go文件里import中的原生驱动打开 | ||
# type: "taosSql" #原生连接方式,端口是6030 | ||
# dsn: "zhgy_iot:zh5365a@tcp(101.200.198.249:6030)/" | ||
|
||
# 文件上传设置 | ||
upload: | ||
path: "upload" | ||
|
||
logger: | ||
path: "resource/log/run" | ||
file: "{Y-m-d}.log" | ||
level: "all" | ||
stdout: true | ||
ctxKeys: [ "RequestId" ] | ||
|
||
#GFToken | ||
gfToken: | ||
timeOut: 10800 #token超时时间(秒) | ||
maxRefresh: 5400 #token自动刷新时间(秒) | ||
multiLogin: true #是否允许一个账号多人同时登录 | ||
encryptKey: "49c54195e750b04e74a8429b17896586" #加密key (32位) | ||
excludePaths: #排除不做登录验证的路由地址 | ||
- "/api/v1/login" | ||
|
||
# Redis 配置示例 | ||
redis: | ||
# 单实例配置 | ||
default: | ||
address: redis:6379 | ||
db: 0 | ||
pass: FDXLK3LdGYYk9mut | ||
idleTimeout: 600 | ||
maxActive: 100 | ||
|
||
# 这个mqtt客户端主要是服务端内部处理消息使用的通道 | ||
mqtt: | ||
addr: emqx:1883 | ||
# 最好带上服务名称,变成唯一id | ||
clientId: sagoo-iot-open-001 | ||
deviceLiveDuration: 30 | ||
|
||
system: | ||
pluginsPath: "./plugins/built" | ||
cache: | ||
prefix: "SagooIOT_" #缓存前缀 | ||
model: "redis" #存储引擎 (memory使用内存|redis使用redis) | ||
|
||
# 授权文件地址 | ||
licFilePath: ./resource |