feat(config): 添加公测自营大区配置

This commit is contained in:
liangtongchuan
2023-04-08 21:16:19 +08:00
parent 94614cc96a
commit cbf2bd28f8
10 changed files with 581 additions and 3 deletions

View File

@@ -0,0 +1,52 @@
import { EggAppConfig, EggAppInfo, PowerPartial } from 'egg';
import defaultConfig from './config.default';
// ! 数据库地址尚未就位
export default (appInfo: EggAppInfo) => {
const config = {} as PowerPartial<EggAppConfig>;
// add your special config in here
config.mongoose = {
url: '', // 内网
options: { useNewUrlParser: true, useUnifiedTopology: true },
};
config.gmmongoose = {
url: '', // 内网
options: { useNewUrlParser: true, useUnifiedTopology: true },
};
config.redis = {
url: '', // 内网
pw: ''
};
config.xtransit = {
server: 'ws://172.16.4.109:9092',
appId: 5,
appSecret: '4441a80f2516a879fa3e4c7c096ab4f1'
};
config.customLogger = {
linkLogger: {
file: '/zyz_logs/gm-server/link-log.log',
formatter(meta) {
return `[${meta.level}] [${meta.date}] ${meta.message}`;
},
},
};
config.logrotator = {
filesRotateBySize: [
'/zyz_logs/gm-server/link-log.log',
],
maxFileSize: 1024,
};
// the return config will combines to EggAppConfig
return {
...defaultConfig(appInfo),
...config,
};
};