docker-compose.yml 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367
  1. version: '3'
  2. services:
  3. ####################################################################################################
  4. ###=================================== 以下为中间件模块 =========================================###
  5. ####################################################################################################
  6. nacos:
  7. image: nacos/nacos-server:2.0.1
  8. hostname: "nacos-standalone"
  9. environment:
  10. - MODE=standalone
  11. - TZ=Asia/Shanghai
  12. volumes:
  13. - /docker/nacos/standalone-logs/:/home/nacos/logs
  14. - /docker/nacos/init.d/custom.properties:/home/nacos/init.d/custom.properties
  15. ports:
  16. - 8848:8848
  17. - 9848:9848
  18. - 9849:9849
  19. networks:
  20. blade_net:
  21. ipv4_address: 172.30.0.48
  22. sentinel:
  23. image: bladex/sentinel-dashboard:1.8.0
  24. hostname: "sentinel"
  25. environment:
  26. - TZ=Asia/Shanghai
  27. ports:
  28. - 8858:8858
  29. restart: on-failure
  30. networks:
  31. blade_net:
  32. ipv4_address: 172.30.0.58
  33. seata-server:
  34. image: seataio/seata-server:1.4.1
  35. hostname: "seata-server"
  36. ports:
  37. - 8091:8091
  38. environment:
  39. - TZ=Asia/Shanghai
  40. - SEATA_PORT=8091
  41. - STORE_MODE=file
  42. networks:
  43. blade_net:
  44. ipv4_address: 172.30.0.68
  45. blade-nginx:
  46. image: nginx:stable-alpine-perl
  47. hostname: "blade-nginx"
  48. environment:
  49. - TZ=Asia/Shanghai
  50. ports:
  51. - 88:88
  52. volumes:
  53. - /docker/nginx/api/nginx.conf:/etc/nginx/nginx.conf
  54. privileged: true
  55. restart: always
  56. networks:
  57. - blade_net
  58. web-nginx:
  59. image: nginx:stable-alpine-perl
  60. hostname: "web-nginx"
  61. environment:
  62. - TZ=Asia/Shanghai
  63. ports:
  64. - 8000:8000
  65. volumes:
  66. - /docker/nginx/web/html:/usr/share/nginx/html
  67. - /docker/nginx/web/nginx.conf:/etc/nginx/nginx.conf
  68. privileged: true
  69. restart: always
  70. networks:
  71. - blade_net
  72. blade-redis:
  73. image: redis:5.0.8-alpine
  74. hostname: "blade-redis"
  75. environment:
  76. - TZ=Asia/Shanghai
  77. ports:
  78. - 3379:6379
  79. volumes:
  80. - /docker/redis/data:/data
  81. command: "redis-server --appendonly yes"
  82. privileged: true
  83. restart: always
  84. networks:
  85. - blade_net
  86. ####################################################################################################
  87. ###================================= 以下为BladeX服务模块 =======================================###
  88. ####################################################################################################
  89. blade-admin:
  90. image: "${REGISTER}/blade-admin:${TAG}"
  91. environment:
  92. - TZ=Asia/Shanghai
  93. ports:
  94. - 7002:7002
  95. privileged: true
  96. restart: always
  97. networks:
  98. blade_net:
  99. ipv4_address: 172.30.0.72
  100. blade-swagger:
  101. image: "${REGISTER}/blade-swagger:${TAG}"
  102. environment:
  103. - TZ=Asia/Shanghai
  104. ports:
  105. - 18000:18000
  106. privileged: true
  107. restart: always
  108. networks:
  109. - blade_net
  110. blade-turbine:
  111. image: "${REGISTER}/blade-turbine:${TAG}"
  112. environment:
  113. - TZ=Asia/Shanghai
  114. ports:
  115. - 7003:7003
  116. privileged: true
  117. restart: always
  118. networks:
  119. - blade_net
  120. blade-gateway1:
  121. image: "${REGISTER}/blade-gateway:${TAG}"
  122. environment:
  123. - TZ=Asia/Shanghai
  124. privileged: true
  125. restart: always
  126. networks:
  127. blade_net:
  128. ipv4_address: 172.30.0.81
  129. blade-gateway2:
  130. image: "${REGISTER}/blade-gateway:${TAG}"
  131. environment:
  132. - TZ=Asia/Shanghai
  133. privileged: true
  134. restart: always
  135. networks:
  136. blade_net:
  137. ipv4_address: 172.30.0.82
  138. blade-auth1:
  139. image: "${REGISTER}/blade-auth:${TAG}"
  140. environment:
  141. - TZ=Asia/Shanghai
  142. privileged: true
  143. restart: always
  144. networks:
  145. blade_net:
  146. ipv4_address: 172.30.0.91
  147. blade-auth2:
  148. image: "${REGISTER}/blade-auth:${TAG}"
  149. environment:
  150. - TZ=Asia/Shanghai
  151. privileged: true
  152. restart: always
  153. networks:
  154. blade_net:
  155. ipv4_address: 172.30.0.92
  156. blade-report:
  157. image: "${REGISTER}/blade-report:${TAG}"
  158. environment:
  159. - TZ=Asia/Shanghai
  160. privileged: true
  161. restart: always
  162. ports:
  163. - 8108:8108
  164. networks:
  165. blade_net:
  166. ipv4_address: 172.30.0.98
  167. blade-log:
  168. image: "${REGISTER}/blade-log:${TAG}"
  169. environment:
  170. - TZ=Asia/Shanghai
  171. privileged: true
  172. restart: always
  173. networks:
  174. - blade_net
  175. blade-desk:
  176. image: "${REGISTER}/blade-desk:${TAG}"
  177. environment:
  178. - TZ=Asia/Shanghai
  179. privileged: true
  180. restart: always
  181. networks:
  182. - blade_net
  183. blade-user:
  184. image: "${REGISTER}/blade-user:${TAG}"
  185. environment:
  186. - TZ=Asia/Shanghai
  187. privileged: true
  188. restart: always
  189. networks:
  190. - blade_net
  191. blade-system:
  192. image: "${REGISTER}/blade-system:${TAG}"
  193. environment:
  194. - TZ=Asia/Shanghai
  195. privileged: true
  196. restart: always
  197. networks:
  198. - blade_net
  199. blade-flow:
  200. image: "${REGISTER}/blade-flow:${TAG}"
  201. environment:
  202. - TZ=Asia/Shanghai
  203. privileged: true
  204. restart: always
  205. networks:
  206. - blade_net
  207. blade-resource:
  208. image: "${REGISTER}/blade-resource:${TAG}"
  209. environment:
  210. - TZ=Asia/Shanghai
  211. privileged: true
  212. restart: always
  213. networks:
  214. - blade_net
  215. ####################################################################################################
  216. ###=============================== 以下为Prometheus监控模块 =====================================###
  217. ####################################################################################################
  218. prometheus:
  219. image: prom/prometheus:v2.24.1
  220. hostname: "prometheus"
  221. environment:
  222. - TZ=Asia/Shanghai
  223. ports:
  224. - 9090:9090
  225. volumes:
  226. - /docker/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
  227. - /docker/prometheus/rules:/etc/prometheus/rules
  228. command: "--config.file=/etc/prometheus/prometheus.yml --web.enable-lifecycle"
  229. privileged: true
  230. restart: always
  231. networks:
  232. blade_net:
  233. ipv4_address: 172.30.0.90
  234. node-exporter:
  235. image: prom/node-exporter:v1.0.1
  236. hostname: "node-exporter"
  237. environment:
  238. - TZ=Asia/Shanghai
  239. ports:
  240. - 9190:9100
  241. privileged: true
  242. restart: always
  243. networks:
  244. blade_net:
  245. ipv4_address: 172.30.0.93
  246. mysqld-exporter:
  247. image: prom/mysqld-exporter:v0.12.1
  248. hostname: "mysqld-exporter"
  249. environment:
  250. - TZ=Asia/Shanghai
  251. # 需要先在mysql服务执行如下语句
  252. # =====================================================================================
  253. # === CREATE USER 'exporter'@'mysql服务ip' IDENTIFIED BY '密码'; ===
  254. # === GRANT PROCESS, REPLICATION CLIENT, SELECT ON *.* TO 'exporter'@'mysql服务ip'; ===
  255. # === flush privileges; ===
  256. # =====================================================================================
  257. - DATA_SOURCE_NAME=exporter:密码@(mysql服务ip:mysql服务端口)/
  258. ports:
  259. - 9104:9104
  260. privileged: true
  261. restart: always
  262. networks:
  263. blade_net:
  264. ipv4_address: 172.30.0.94
  265. cadvisor:
  266. image: google/cadvisor:v0.33.0
  267. hostname: "cadvisor"
  268. environment:
  269. - TZ=Asia/Shanghai
  270. ports:
  271. - 18080:8080
  272. volumes:
  273. - /:/rootfs:ro
  274. - /var/run:/var/run:rw
  275. - /sys:/sys:ro
  276. - /var/lib/docker/:/var/lib/docker:ro
  277. - /dev/disk/:/dev/disk:ro
  278. command: "detach=true"
  279. privileged: true
  280. restart: always
  281. networks:
  282. blade_net:
  283. ipv4_address: 172.30.0.180
  284. grafana:
  285. image: grafana/grafana:7.3.7
  286. hostname: "grafana"
  287. environment:
  288. - TZ=Asia/Shanghai
  289. - GF_SERVER_ROOT_URL=https://grafana.bladex.vip
  290. - GF_SECURITY_ADMIN_PASSWORD=1qaz@WSX
  291. ports:
  292. - 3000:3000
  293. volumes:
  294. - /docker/grafana/grafana.ini:/etc/grafana/grafana.ini
  295. - /docker/grafana:/var/lib/grafana
  296. privileged: true
  297. restart: always
  298. networks:
  299. blade_net:
  300. ipv4_address: 172.30.0.30
  301. alertmanager:
  302. image: prom/alertmanager:v0.21.0
  303. hostname: "alertmanager"
  304. environment:
  305. - TZ=Asia/Shanghai
  306. ports:
  307. - 9093:9093
  308. volumes:
  309. - /docker/alertmanager/alertmanager.yml:/etc/alertmanager/alertmanager.yml
  310. - /docker/alertmanager/data:/etc/alertmanager/data
  311. - /docker/alertmanager/templates:/etc/alertmanager/templates
  312. command: "--config.file=/etc/alertmanager/alertmanager.yml --storage.path=/etc/alertmanager/data"
  313. privileged: true
  314. restart: always
  315. networks:
  316. blade_net:
  317. ipv4_address: 172.30.0.99
  318. webhook-dingtalk:
  319. image: timonwong/prometheus-webhook-dingtalk:v1.4.0
  320. hostname: "webhook-dingtalk"
  321. environment:
  322. - TZ=Asia/Shanghai
  323. ports:
  324. - 8060:8060
  325. command: "ding.profile=webhook_robot=https://oapi.dingtalk.com/robot/send?access_token=xxxxx"
  326. privileged: true
  327. restart: always
  328. networks:
  329. blade_net:
  330. ipv4_address: 172.30.0.96
  331. networks:
  332. blade_net:
  333. driver: bridge
  334. ipam:
  335. config:
  336. - subnet: 172.30.0.0/16