config.local.js 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. /* eslint valid-jsdoc: "off" */
  2. 'use strict';
  3. /**
  4. * @param {Egg.EggAppInfo} appInfo app info
  5. */
  6. module.exports = () => {
  7. const config = exports = {};
  8. const userConfig = { // sit
  9. chargingCycleApi:
  10. 'http://10.6.181.22:60080/fawtsp/fawiovconditionquery/iov/analysis/driving-behavior/charging-cycle',
  11. rbacApi: // sit
  12. 'http://10.6.181.22:60080/fawtsp/faw-ops-portal/op/portal/basic/userInfoFind/account/loginByToken',
  13. travelApi: // sit
  14. 'http://10.6.181.22:60080/fawtsp/fawiovconditionquery/iov/vhl/locationsList',
  15. };
  16. config.mongoose = {
  17. clients: {
  18. etlDB: { // 原始数据库
  19. // url: 'mongodb://faw-etl:faw-etl123@10.120.8.56:27041,10.120.8.19:27041,10.120.8.38:27041/faw-etl?replicaSet=rs',
  20. url: 'mongodb://faw-etl-admin:faw-etl-admin%40123@10.112.16.11:27017/faw-etl', // sit
  21. options: {
  22. useUnifiedTopology: true,
  23. poolSize: 40,
  24. },
  25. },
  26. etlLocalDB: { // 本地清洗后的数据库
  27. url: 'mongodb://faw-etl-local:faw-etl-local%40123@10.112.16.11:27017/faw-etl-local', // sit
  28. options: {
  29. useUnifiedTopology: true,
  30. poolSize: 40,
  31. },
  32. },
  33. etlAutoDB: { // 自动化测试数据库
  34. url: 'mongodb://fawtsp:fawtsp@10.112.16.11:27017/faw', // sit
  35. options: {
  36. useUnifiedTopology: true,
  37. poolSize: 40,
  38. },
  39. },
  40. },
  41. };
  42. config.redis = {
  43. client: {
  44. cluster: true,
  45. nodes: [
  46. {
  47. host: '10.112.16.11',
  48. port: 6001,
  49. family: 'tsp',
  50. password: 'Qmgps2019!@#',
  51. db: 0,
  52. },
  53. {
  54. host: '10.112.16.11',
  55. port: 6002,
  56. family: 'tsp',
  57. password: 'Qmgps2019!@#',
  58. db: 0,
  59. },
  60. {
  61. host: '10.112.16.11',
  62. port: 6003,
  63. family: 'tsp',
  64. password: 'Qmgps2019!@#',
  65. db: 0,
  66. },
  67. ],
  68. },
  69. };
  70. // const userConfig = {
  71. // chargingCycleApi: // 生产
  72. // 'http://10.7.116.247:60080/test/fawiovconditionquery/iov/analysis/driving-behavior/charging-cycle',
  73. // rbacApi: // 生产
  74. // 'http://10.7.116.247:60080/test/faw-ops-portal/op/portal/basic/userInfoFind/account/loginByToken',
  75. // travelApi: // 生产
  76. // 'http://10.7.116.247:60080/test/fawiovconditionquery/iov/vhl/locationsList',
  77. // };
  78. // config.mongoose = {
  79. // clients: {
  80. // etlDB: { // 原始数据库
  81. // url: 'mongodb://faw-etl:faw-etl123@10.120.8.56:27041,10.120.8.19:27041,10.120.8.38:27041/faw-etl?replicaSet=rs', // 生产
  82. // options: {
  83. // useUnifiedTopology: true,
  84. // poolSize: 40,
  85. // },
  86. // },
  87. // etlLocalDB: { // 本地清洗后的数据库
  88. // url: 'mongodb://faw-etl-local3:faw-etl-local3%40faw@10.120.8.56:27041,10.120.8.19:27041,10.120.8.38:27041/faw-etl-local3?replicaSet=rs', // 生产
  89. // options: {
  90. // useUnifiedTopology: true,
  91. // poolSize: 40,
  92. // },
  93. // },
  94. // etlAutoDB: {
  95. // url: 'mongodb://faw:fawl123@10.120.8.56:27041,10.120.8.19:27041,10.120.8.38:27041/faw?replicaSet=rs', // 生产
  96. // options: {
  97. // useUnifiedTopology: true,
  98. // poolSize: 40,
  99. // },
  100. // },
  101. // },
  102. // };
  103. // config.redis = {
  104. // client: {
  105. // cluster: true,
  106. // nodes: [
  107. // {
  108. // host: '10.120.8.70',
  109. // port: 16377,
  110. // family: 'tsp',
  111. // password: 'tspRedis123',
  112. // db: 0,
  113. // },
  114. // {
  115. // host: '10.120.8.64',
  116. // port: 16377,
  117. // family: 'tsp',
  118. // password: 'tspRedis123',
  119. // db: 0,
  120. // },
  121. // {
  122. // host: '10.120.8.68',
  123. // port: 16377,
  124. // family: 'tsp',
  125. // password: 'tspRedis123',
  126. // db: 0,
  127. // },
  128. // {
  129. // host: '10.120.8.71',
  130. // port: 16377,
  131. // family: 'tsp',
  132. // password: 'tspRedis123',
  133. // db: 0,
  134. // },
  135. // {
  136. // host: '10.120.8.67',
  137. // port: 16377,
  138. // family: 'tsp',
  139. // password: 'tspRedis123',
  140. // db: 0,
  141. // },
  142. // {
  143. // host: '10.120.8.75',
  144. // port: 16377,
  145. // family: 'tsp',
  146. // password: 'tspRedis123',
  147. // db: 0,
  148. // },
  149. // {
  150. // host: '10.120.8.66',
  151. // port: 16377,
  152. // family: 'tsp',
  153. // password: 'tspRedis123',
  154. // db: 0,
  155. // },
  156. // {
  157. // host: '10.120.8.74',
  158. // port: 16377,
  159. // family: 'tsp',
  160. // password: 'tspRedis123',
  161. // db: 0,
  162. // },
  163. // {
  164. // host: '10.120.8.69',
  165. // port: 16377,
  166. // family: 'tsp',
  167. // password: 'tspRedis123',
  168. // db: 0,
  169. // },
  170. // {
  171. // host: '10.120.8.104',
  172. // port: 16377,
  173. // family: 'tsp',
  174. // password: 'tspRedis123',
  175. // db: 0,
  176. // },
  177. // {
  178. // host: '10.120.8.73',
  179. // port: 16377,
  180. // family: 'tsp',
  181. // password: 'tspRedis123',
  182. // db: 0,
  183. // },
  184. // {
  185. // host: '10.120.8.65',
  186. // port: 16377,
  187. // family: 'tsp',
  188. // password: 'tspRedis123',
  189. // db: 0,
  190. // },
  191. // ],
  192. // },
  193. // };// 生产
  194. return {
  195. ...config,
  196. ...userConfig,
  197. };
  198. };