feat(config): 添加公测渠道配置

This commit is contained in:
liangtongchuan
2023-04-27 18:35:05 +08:00
parent 464238c2c5
commit 53b6c4197e
9 changed files with 328 additions and 4 deletions

View File

@@ -0,0 +1,51 @@
import { EggAppConfig, EggAppInfo, PowerPartial } from 'egg';
import defaultConfig from './config.default';
export default (appInfo: EggAppInfo) => {
const config = {} as PowerPartial<EggAppConfig>;
config.middleware = [ 'parmsDecode', 'getIp', 'proxy' ];
config.mongoose = {
url: 'mongodb://yjzDbOp:yjz2023ZyDB@dds-8vb6c08497bde7141.mongodb.zhangbei.rds.aliyuncs.com:3717,dds-8vb6c08497bde7142.mongodb.zhangbei.rds.aliyuncs.com:3717,dds-8vb6c08497bde7143.mongodb.zhangbei.rds.aliyuncs.com:3717,dds-8vb6c08497bde7144.mongodb.zhangbei.rds.aliyuncs.com:3717/zyz?replicaSet=mgset-516005505', // 内网
options: { useNewUrlParser: true, useUnifiedTopology: true },
};
config.gmmongoose = {
url: 'mongodb://yjzGmDbOp:yjz2023ZyGmDB@dds-8vbdf8c89bbdbd241.mongodb.zhangbei.rds.aliyuncs.com:3717,dds-8vbdf8c89bbdbd242.mongodb.zhangbei.rds.aliyuncs.com:3717,dds-8vbdf8c89bbdbd243.mongodb.zhangbei.rds.aliyuncs.com:3717,dds-8vbdf8c89bbdbd244.mongodb.zhangbei.rds.aliyuncs.com:3717/zyzgm?replicaSet=mgset-515829436', // 内网
options: { useNewUrlParser: true, useUnifiedTopology: true },
};
config.redis = {
url: 'r-8vbqgdc3h9ac77fdvi.redis.zhangbei.rds.aliyuncs.com', // 内网
pw: 'hWCJ$HDajm9SN&&Z'
};
config.xtransit = {
server: 'ws://172.16.4.147:9092',
appId: 5,
appSecret: '1c85221722efa1daec1097cd802ac939'
};
config.customLogger = {
linkLogger: {
file: '/zyz_logs/web-server/link-log.log',
formatter(meta) {
return `[${meta.level}] [${meta.date}] ${meta.message}`;
},
},
};
config.logrotator = {
filesRotateBySize: [
'/zyz_logs/web-server/link-log.log',
],
maxFileSize: 1024 * 1024 * 1024,
};
// the return config will combines to EggAppConfig
return {
...defaultConfig(appInfo),
...config
};
};