修改配置文件
This commit is contained in:
parent
5e707ba38a
commit
537f372d1a
@ -1,34 +1,14 @@
|
||||
# dev-开发环境 test-测试环境 prod-生产环境
|
||||
env: prod
|
||||
# 服务配置
|
||||
server:
|
||||
# 服务端口
|
||||
port: 9091
|
||||
# 动力学端口配置
|
||||
dynamics:
|
||||
ip: 10.60.1.121
|
||||
udpLocalPort: 4000
|
||||
udpRemotePort: 3000
|
||||
udpRemoteTrainPort: 3001
|
||||
httpPort: 7800
|
||||
open: true
|
||||
# VOBC
|
||||
vobc:
|
||||
ip: 10.60.1.59
|
||||
localPort: 10000
|
||||
remotePort: 4000
|
||||
open: true
|
||||
# interlock
|
||||
interlock:
|
||||
ip: 10.60.1.59
|
||||
localPort: 10000
|
||||
remotePort: 4000
|
||||
open: false
|
||||
|
||||
# 数据源
|
||||
datasource:
|
||||
# 数据库访问url
|
||||
dsn: root:Joylink@0503@tcp(10.60.1.101:3306)/bj-rtsts?charset=utf8mb4&parseTime=true&loc=UTC
|
||||
|
||||
# 日志配置
|
||||
logging:
|
||||
# 日志级别
|
||||
level: info
|
||||
@ -48,6 +28,8 @@ logging:
|
||||
compress: false
|
||||
# 控制台是否输出
|
||||
stdout: false
|
||||
|
||||
# 消息配置
|
||||
messaging:
|
||||
mqtt:
|
||||
address: tcp://10.60.1.111:1883
|
||||
|
@ -14,14 +14,14 @@ const (
|
||||
)
|
||||
|
||||
type AppConfig struct {
|
||||
Env string
|
||||
// Env string
|
||||
Server server
|
||||
Datasource datasource
|
||||
Logging log
|
||||
Messaging messaging
|
||||
Dynamics DynamicsConfig
|
||||
Vobc VobcConfig
|
||||
Interlock InterlockConfig
|
||||
// Dynamics DynamicsConfig
|
||||
// Vobc VobcConfig
|
||||
// Interlock InterlockConfig
|
||||
}
|
||||
type server struct {
|
||||
Port int
|
||||
|
@ -1,35 +1,14 @@
|
||||
# dev-开发环境 test-测试环境 prod-生产环境
|
||||
env: dev
|
||||
# 服务配置
|
||||
server:
|
||||
# 服务端口
|
||||
port: 9091
|
||||
# 动力学端口配置
|
||||
dynamics:
|
||||
ip: 192.168.3.37
|
||||
udpLocalPort: 4000
|
||||
udpRemotePort: 3000
|
||||
udpRemoteTrainPort: 3001
|
||||
httpPort: 7800
|
||||
open: false
|
||||
# VOBC
|
||||
vobc:
|
||||
ip: 10.60.1.59
|
||||
localPort: 10000
|
||||
remotePort: 4000
|
||||
open: false
|
||||
# interlock
|
||||
interlock:
|
||||
ip: 10.60.1.59
|
||||
localPort: 10000
|
||||
remotePort: 4000
|
||||
open: false
|
||||
|
||||
|
||||
# 数据源
|
||||
datasource:
|
||||
# 数据库访问url
|
||||
dsn: root:joylink0503@tcp(192.168.3.233:3306)/bj-rtss?charset=utf8mb4&parseTime=true&loc=UTC
|
||||
|
||||
# 日志配置
|
||||
logging:
|
||||
# 日志级别
|
||||
level: debug
|
||||
@ -49,6 +28,8 @@ logging:
|
||||
compress: false
|
||||
# 控制台是否输出
|
||||
stdout: true
|
||||
|
||||
# 消息配置
|
||||
messaging:
|
||||
mqtt:
|
||||
address: tcp://192.168.3.233:1883
|
||||
|
@ -1,35 +1,14 @@
|
||||
# dev-开发环境 test-测试环境 prod-生产环境 local-线下项目
|
||||
env: local
|
||||
# 服务配置
|
||||
server:
|
||||
# 服务端口
|
||||
port: 9091
|
||||
# 动力学端口配置
|
||||
dynamics:
|
||||
ip: 192.168.3.37
|
||||
udpLocalPort: 4000
|
||||
udpRemotePort: 3000
|
||||
udpRemoteTrainPort: 3001
|
||||
httpPort: 7800
|
||||
open: false
|
||||
# VOBC
|
||||
vobc:
|
||||
ip: 10.60.1.59
|
||||
localPort: 10000
|
||||
remotePort: 4000
|
||||
open: false
|
||||
# interlock
|
||||
interlock:
|
||||
ip: 10.60.1.59
|
||||
localPort: 10000
|
||||
remotePort: 4000
|
||||
open: false
|
||||
|
||||
|
||||
# 数据源
|
||||
datasource:
|
||||
# 数据库访问url
|
||||
dsn: root:localdb@tcp(192.168.53.11:3306)/bj-rtss?charset=utf8mb4&parseTime=true&loc=UTC
|
||||
|
||||
# 日志配置
|
||||
logging:
|
||||
# 日志级别
|
||||
level: info
|
||||
@ -49,6 +28,8 @@ logging:
|
||||
compress: false
|
||||
# 控制台是否输出
|
||||
stdout: false
|
||||
|
||||
# 消息配置
|
||||
messaging:
|
||||
mqtt:
|
||||
address: tcp://192.168.0.203:1883
|
||||
|
37
config/test.yml
Normal file
37
config/test.yml
Normal file
@ -0,0 +1,37 @@
|
||||
# 服务配置
|
||||
server:
|
||||
# 服务端口
|
||||
port: 9091
|
||||
|
||||
# 数据源
|
||||
datasource:
|
||||
# 数据库访问url
|
||||
dsn: root:joylink0503@tcp(192.168.53.22:3306)/bj-rtss?charset=utf8mb4&parseTime=true&loc=UTC
|
||||
|
||||
# 日志配置
|
||||
logging:
|
||||
# 日志级别
|
||||
level: info
|
||||
# 格式化
|
||||
# format: json
|
||||
# 日志文件路径
|
||||
path: /logs/bjrtsts
|
||||
# 日志文件名
|
||||
fileName: bjrtsts.log
|
||||
# 单个日志文件大小,单位mb,超过会自动滚动
|
||||
fileMaxSize: 5
|
||||
# 日志文件最大备份数量
|
||||
fileMaxBackups: 100
|
||||
# 日志文件最大保留时间,单位 天
|
||||
maxAge: 30
|
||||
# 是否压缩日志
|
||||
compress: false
|
||||
# 控制台是否输出
|
||||
stdout: false
|
||||
|
||||
# 消息配置
|
||||
messaging:
|
||||
mqtt:
|
||||
address: tcp://114.116.51.125:1883
|
||||
username: rtsts_service
|
||||
password: joylink@0503
|
@ -1,34 +1,14 @@
|
||||
# dev-开发环境 test-测试环境 prod-生产环境
|
||||
env: test
|
||||
# 服务配置
|
||||
server:
|
||||
# 服务端口
|
||||
port: 9091
|
||||
# 动力学端口配置
|
||||
dynamics:
|
||||
ip: 192.168.3.233
|
||||
udpLocalPort: 4000
|
||||
udpRemotePort: 3000
|
||||
udpRemoteTrainPort: 3001
|
||||
httpPort: 7800
|
||||
open: true
|
||||
# VOBC
|
||||
vobc:
|
||||
ip: 10.60.1.59
|
||||
localPort: 10000
|
||||
remotePort: 4000
|
||||
open: true
|
||||
# interlock
|
||||
interlock:
|
||||
ip: 10.60.1.59
|
||||
localPort: 10000
|
||||
remotePort: 4000
|
||||
open: false
|
||||
|
||||
|
||||
# 数据源
|
||||
datasource:
|
||||
# 数据库访问url
|
||||
dsn: root:joylink0503@tcp(192.168.53.22:3306)/bj-rtss?charset=utf8mb4&parseTime=true&loc=UTC
|
||||
|
||||
# 日志配置
|
||||
logging:
|
||||
# 日志级别
|
||||
level: info
|
||||
@ -48,6 +28,8 @@ logging:
|
||||
compress: false
|
||||
# 控制台是否输出
|
||||
stdout: false
|
||||
|
||||
# 消息配置
|
||||
messaging:
|
||||
mqtt:
|
||||
address: tcp://192.168.3.233:1883
|
||||
|
Loading…
Reference in New Issue
Block a user