Skip to content

Commit

Permalink
Merge pull request #26 from weiwiegeng/main
Browse files Browse the repository at this point in the history
修改gitignore导致config.yaml无法提交问题
  • Loading branch information
xinjiayu authored Dec 1, 2023
2 parents d8c1d02 + 3f9df7f commit eef56d2
Show file tree
Hide file tree
Showing 2 changed files with 112 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,8 @@ resource/log/
#resource/public/
logs/
upload/product_icon/
config.yaml
manifest/config/config.yaml
manifest/docker-compose/emqx/
manifest/docker-compose/mysql/data
manifest/docker-compose/redis/data
extend/log/
108 changes: 108 additions & 0 deletions manifest/docker-compose/iot-open/config/config.yaml
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

0 comments on commit eef56d2

Please sign in to comment.