|
@@ -1,24 +1,26 @@
|
|
import { MidwayConfig } from '@midwayjs/core';
|
|
import { MidwayConfig } from '@midwayjs/core';
|
|
-// 线上生产环境
|
|
|
|
-const ip = '127.0.0.1';
|
|
|
|
-const suffix = '';
|
|
|
|
|
|
+const ip = 'host.docker.internal';
|
|
|
|
+const branch = 'Two';
|
|
|
|
+const branchRouter = 'two';
|
|
|
|
+const baseDB = `shopping${branch}`;
|
|
|
|
+const dbName = `shopping${branch}_chat`;
|
|
|
|
+const mqUser = `shopping${branch}`;
|
|
|
|
+const routePrefix = `/point/${branchRouter}/chat/v1/api`;
|
|
|
|
+const suffix = `_${branch}_local`;
|
|
export default {
|
|
export default {
|
|
// use for cookie sign key, should change to your own and keep security
|
|
// use for cookie sign key, should change to your own and keep security
|
|
keys: '1669597198171_1000',
|
|
keys: '1669597198171_1000',
|
|
koa: {
|
|
koa: {
|
|
- port: 12114,
|
|
|
|
- globalPrefix: '/point/chat/v1/api',
|
|
|
|
|
|
+ port: 12314,
|
|
|
|
+ globalPrefix: routePrefix,
|
|
},
|
|
},
|
|
webSocket: {
|
|
webSocket: {
|
|
clientTracking: true,
|
|
clientTracking: true,
|
|
},
|
|
},
|
|
- swagger: {
|
|
|
|
- swaggerPath: '/point/chat/v1/api/doc/api',
|
|
|
|
- },
|
|
|
|
mongoose: {
|
|
mongoose: {
|
|
dataSource: {
|
|
dataSource: {
|
|
default: {
|
|
default: {
|
|
- uri: `mongodb://${ip}:27017/tehq_chat`,
|
|
|
|
|
|
+ uri: `mongodb://${ip}:27017/${dbName}`,
|
|
options: {
|
|
options: {
|
|
user: 'admin',
|
|
user: 'admin',
|
|
pass: 'admin',
|
|
pass: 'admin',
|
|
@@ -28,7 +30,7 @@ export default {
|
|
entities: ['./entity/chat'],
|
|
entities: ['./entity/chat'],
|
|
},
|
|
},
|
|
base: {
|
|
base: {
|
|
- uri: `mongodb://${ip}:27017/point_shopping`,
|
|
|
|
|
|
+ uri: `mongodb://${ip}:27017/${baseDB}`,
|
|
options: {
|
|
options: {
|
|
user: 'admin',
|
|
user: 'admin',
|
|
pass: 'admin',
|
|
pass: 'admin',
|
|
@@ -39,34 +41,21 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
- redis: {
|
|
|
|
- client: {
|
|
|
|
- port: 6379, // Redis port
|
|
|
|
- host: ip, // Redis host
|
|
|
|
- password: '123456',
|
|
|
|
- db: 1,
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- redisKey: {
|
|
|
|
- orderKeyPrefix: 'orderKey:',
|
|
|
|
- },
|
|
|
|
- redisTimeout: 600,
|
|
|
|
-
|
|
|
|
jwt: {
|
|
jwt: {
|
|
secret: 'Ziyouyanfa!@#',
|
|
secret: 'Ziyouyanfa!@#',
|
|
},
|
|
},
|
|
axios: {
|
|
axios: {
|
|
clients: {
|
|
clients: {
|
|
wechat: {
|
|
wechat: {
|
|
- baseURL: 'http://127.0.0.1:14001/wechat/api', // http://127.0.0.1:14001/wechat/api
|
|
|
|
|
|
+ baseURL: 'https://broadcast.waityou24.cn/wechat/api', // http://127.0.0.1:14001/wechat/api
|
|
},
|
|
},
|
|
base: {
|
|
base: {
|
|
- baseURL: 'http://127.0.0.1', // http://127.0.0.1:12211
|
|
|
|
|
|
+ baseURL: `https://broadcast.waityou24.cn/point/${branchRouter}/v1/api`, // http://127.0.0.1:12211
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
rabbitmq: {
|
|
rabbitmq: {
|
|
- url: `amqp://tehq:tehq@${ip}/tehq`,
|
|
|
|
|
|
+ url: `amqp://${mqUser}:${mqUser}@${ip}/${mqUser}`,
|
|
},
|
|
},
|
|
mqConfig: {
|
|
mqConfig: {
|
|
normal: {
|
|
normal: {
|