import { MidwayConfig } from '@midwayjs/core'; const ip = 'host.docker.internal'; const redisHost = ip; const redisPwd = '123456'; const redisDB = 1; const projectDB = 'vue3js-template-test'; const recordDB = 'vue3js-template-test-record' const loginSign = 'information_platform'; export default { // use for cookie sign key, should change to your own and keep security keys: '1697684406848_4978', loginSign, koa: { port: 9700, globalPrefix: '/cxyy/api', queryParseMode: 'extended', }, elasticsearch: { node: 'http://localhost:9200', auth: { username: 'elastic', password: 'NAjqFz_7tS2DkdpU7p*x', }, }, dbName: projectDB, mongoose: { dataSource: { default: { uri: `mongodb://${ip}:27017/${projectDB}`, options: { user: 'admin', pass: 'admin', authSource: 'admin', useNewUrlParser: true, }, entities: ['./entity'], }, record:{ uri: `mongodb://${ip}:27017/${recordDB}`, options: { user: 'admin', pass: 'admin', authSource: 'admin', useNewUrlParser: true, }, entities: ['./entityRecord'], } }, }, redis: { client: { port: 6379, // Redis port host: redisHost, // Redis host password: redisPwd, db: redisDB, }, }, bull: { // 默认的队列配置 defaultQueueOptions: { redis: { port: 6379, host: redisHost, password: redisPwd, db: redisDB, }, }, }, upload: { whitelist: null, }, } as MidwayConfig;