config.prod.js 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /* eslint valid-jsdoc: "off" */
  2. 'use strict';
  3. const ip = 'host.docker.internal'
  4. /**
  5. * @param {Egg.EggAppInfo} appInfo app info
  6. */
  7. module.exports = appInfo => {
  8. /**
  9. * built-in config
  10. * @type {Egg.EggAppConfig}
  11. **/
  12. const config = (exports = {});
  13. // use for cookie sign key, should change to your own and keep security
  14. config.keys = appInfo.name + '_1665483162811_546';
  15. // add your middleware config here
  16. config.middleware = [];
  17. // add your user config here
  18. const userConfig = {
  19. // myAppName: 'egg',
  20. };
  21. // redis设置
  22. config.redis = {
  23. client: {
  24. port: 6379, // Redis port
  25. host: ip, // Redis host
  26. password: '123456',
  27. db: 9,
  28. },
  29. };
  30. // 进程设置
  31. config.cluster = {
  32. listen: {
  33. port: 14002,
  34. },
  35. };
  36. // 数据库设置
  37. config.dbName = 'service-email';
  38. config.mongoose = {
  39. url: `mongodb://${ip}:27017/${config.dbName}`,
  40. options: {
  41. user: 'admin',
  42. pass: 'admin',
  43. authSource: 'admin',
  44. useNewUrlParser: true,
  45. useCreateIndex: true,
  46. },
  47. };
  48. // 邮件发送人
  49. config.sender = {
  50. free: {
  51. from: '福瑞科技',
  52. user: 'myhope1977@163.com', // 邮箱账号
  53. pass: 'RZGYKLOQUTRCNLEO', // 邮箱stmp授权码
  54. },
  55. tehq: {
  56. from: '天恩活泉',
  57. user: 'gzsdcsmfzyxgs@163.com',
  58. pass: 'URWCTDJNYKVOBBRN',
  59. },
  60. jcyjdtglpt: {
  61. from: '基础研究动态管理平台',
  62. user: 'myhope1977@163.com',
  63. pass: 'RZGYKLOQUTRCNLEO',
  64. },
  65. shoppingOne: {
  66. from: '丽姐品牌内衣店',
  67. user: 'myhope1977@163.com', // 邮箱账号
  68. pass: 'RZGYKLOQUTRCNLEO', // 邮箱stmp授权码
  69. },
  70. wx: {
  71. from: 'wx服务',
  72. user: 'myhope1977@163.com', // 邮箱账号
  73. pass: 'RZGYKLOQUTRCNLEO', // 邮箱stmp授权码
  74. },
  75. };
  76. // 开发人员邮箱,","分隔
  77. config.devPerson = '402788946@qq.com';
  78. // 路由设置
  79. config.routePrefix = '/semail/api';
  80. return {
  81. ...config,
  82. ...userConfig,
  83. };
  84. };