52 lines
1.6 KiB
TypeScript
52 lines
1.6 KiB
TypeScript
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: 'mongodb://dbop:zyzSQ92023@dds-8vb6eea40c3207641.mongodb.zhangbei.rds.aliyuncs.com:3717,dds-8vb6eea40c3207642.mongodb.zhangbei.rds.aliyuncs.com:3717/zyz?replicaSet=mgset-515389269', // 内网
|
|
options: { useNewUrlParser: true, useUnifiedTopology: true },
|
|
};
|
|
|
|
config.gmmongoose = {
|
|
url: 'mongodb://dbop:zyzSQGm2021@dds-8vb5de93552a67941.mongodb.zhangbei.rds.aliyuncs.com:3717,dds-8vb5de93552a67942.mongodb.zhangbei.rds.aliyuncs.com:3717,dds-8vb5de93552a67943.mongodb.zhangbei.rds.aliyuncs.com:3717/zyzgm?readPreference=secondary&replicaSet=mgset-508112742', // 内网
|
|
options: { useNewUrlParser: true, useUnifiedTopology: true },
|
|
};
|
|
|
|
config.redis = {
|
|
url: 'r-8vbjy2v5jepcsozyum.redis.zhangbei.rds.aliyuncs.com', // 内网
|
|
pw: 'hWCJ$HDajm9SN&&Z'
|
|
};
|
|
|
|
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,
|
|
};
|
|
};
|