|
@@ -1,24 +1,30 @@
|
|
|
import { MidwayConfig } from '@midwayjs/core';
|
|
|
-// 线上生产环境
|
|
|
-const ip = '127.0.0.1';
|
|
|
-const suffix = '';
|
|
|
+const ip = 'host.docker.internal';
|
|
|
+const baseDB = 'shoppingOne';
|
|
|
+const dbName = 'shoppingOne_chat';
|
|
|
+const redisPwd = '123456';
|
|
|
+const redisDB = 2;
|
|
|
+const mqUser = 'shoppingOne';
|
|
|
+const routePrefix = '/point/one/chat/v1/api';
|
|
|
+const swaggerPath = '/point/one/chat/v1/api/doc/api'
|
|
|
+const suffix = '_local';
|
|
|
export default {
|
|
|
// use for cookie sign key, should change to your own and keep security
|
|
|
keys: '1669597198171_1000',
|
|
|
koa: {
|
|
|
- port: 12114,
|
|
|
- globalPrefix: '/point/chat/v1/api',
|
|
|
+ port: 12214,
|
|
|
+ globalPrefix: routePrefix,
|
|
|
},
|
|
|
webSocket: {
|
|
|
clientTracking: true,
|
|
|
},
|
|
|
swagger: {
|
|
|
- swaggerPath: '/point/chat/v1/api/doc/api',
|
|
|
+ swaggerPath: swaggerPath,
|
|
|
},
|
|
|
mongoose: {
|
|
|
dataSource: {
|
|
|
default: {
|
|
|
- uri: `mongodb://${ip}:27017/tehq_chat`,
|
|
|
+ uri: `mongodb://${ip}:27017/${dbName}`,
|
|
|
options: {
|
|
|
user: 'admin',
|
|
|
pass: 'admin',
|
|
@@ -28,7 +34,7 @@ export default {
|
|
|
entities: ['./entity/chat'],
|
|
|
},
|
|
|
base: {
|
|
|
- uri: `mongodb://${ip}:27017/point_shopping`,
|
|
|
+ uri: `mongodb://${ip}:27017/${baseDB}`,
|
|
|
options: {
|
|
|
user: 'admin',
|
|
|
pass: 'admin',
|
|
@@ -43,8 +49,8 @@ export default {
|
|
|
client: {
|
|
|
port: 6379, // Redis port
|
|
|
host: ip, // Redis host
|
|
|
- password: '123456',
|
|
|
- db: 1,
|
|
|
+ password: redisPwd,
|
|
|
+ db: redisDB,
|
|
|
},
|
|
|
},
|
|
|
redisKey: {
|
|
@@ -58,15 +64,15 @@ export default {
|
|
|
axios: {
|
|
|
clients: {
|
|
|
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: {
|
|
|
- baseURL: 'http://127.0.0.1', // http://127.0.0.1:12211
|
|
|
+ baseURL: `https://broadcast.waityou24.cn${routePrefix}`, // http://127.0.0.1:12211
|
|
|
},
|
|
|
},
|
|
|
},
|
|
|
rabbitmq: {
|
|
|
- url: `amqp://tehq:tehq@${ip}/tehq`,
|
|
|
+ url: `amqp://${mqUser}:${mqUser}@${ip}/${mqUser}`,
|
|
|
},
|
|
|
mqConfig: {
|
|
|
normal: {
|