Files
ZYZ/gm-server/config/config.zy1.ts
2023-04-24 20:18:55 +08:00

52 lines
1.8 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://yjzDbOp:yjz2023ZyDB@dds-8vb801bc3bc34e741.mongodb.zhangbei.rds.aliyuncs.com:3717,dds-8vb801bc3bc34e742.mongodb.zhangbei.rds.aliyuncs.com:3717,dds-8vb801bc3bc34e743.mongodb.zhangbei.rds.aliyuncs.com:3717,dds-8vb801bc3bc34e744.mongodb.zhangbei.rds.aliyuncs.com:3717/zyz?replicaSet=mgset-515829261', // 内网
options: { useNewUrlParser: true, useUnifiedTopology: true },
};
config.gmmongoose = {
url: 'mongodb://yjzGmDbOp:yjz2023ZyGmDB@dds-8vbdf8c89bbdbd241580-pub.mongodb.zhangbei.rds.aliyuncs.com:3717,dds-8vbdf8c89bbdbd242705-pub.mongodb.zhangbei.rds.aliyuncs.com:3717,dds-8vbdf8c89bbdbd243998-pub.mongodb.zhangbei.rds.aliyuncs.com:3717,dds-8vbdf8c89bbdbd244698-pub.mongodb.zhangbei.rds.aliyuncs.com:3717/zyzgm?replicaSet=mgset-515829436', // 内网
options: { useNewUrlParser: true, useUnifiedTopology: true },
};
config.redis = {
url: 'r-8vbkqfcnivt4ja3ndj.redis.zhangbei.rds.aliyuncs.com', // 内网
pw: 'hWCJ$HDajm9SN&&Z'
};
config.xtransit = {
server: 'ws://172.16.4.147:9092',
appId: 3,
appSecret: 'bc33c837395b6dc272fd67f4cf38ef77'
};
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,
};
};