feat(db): web和gm添加只读库支持

This commit is contained in:
liangtongchuan
2023-05-06 16:04:57 +08:00
parent e65efa4192
commit 96407c470e
8 changed files with 62 additions and 2 deletions

View File

@@ -10,6 +10,11 @@ export default (appInfo: EggAppInfo) => {
options: { useNewUrlParser: true, useUnifiedTopology: true },
};
config.romongoose = {
url: 'mongodb://dbop:zyzDev2021@dds-8vb5c74ba4263da43.mongodb.zhangbei.rds.aliyuncs.com:3717/zyz?readPreference=secondary&readPreferenceTags=role:readonly&replicaSet=mgset-506991391', // 内网
options: { useNewUrlParser: true, useUnifiedTopology: true },
};
config.redis = {
url: 'r-8vbl8okinxn1zhkwh2.redis.zhangbei.rds.aliyuncs.com', // 内网
pw: 'zyz_alpha_2021'