docker-compose.yml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. version : '3.8'
  2. networks:
  3. cloud-net:
  4. name: cloud-net
  5. ipam:
  6. config:
  7. - subnet: 172.18.0.0/16
  8. services:
  9. hcp-nacos:
  10. container_name: hcp-nacos
  11. image: nacos/nacos-server:2.0.3-slim
  12. build:
  13. context: ./nacos
  14. environment:
  15. - MODE=standalone
  16. volumes:
  17. - ./nacos/logs/:/home/nacos/logs
  18. - ./nacos/conf/application.properties:/home/nacos/conf/application.properties
  19. ports:
  20. - "8848:8848"
  21. - "9848:9848"
  22. - "9849:9849"
  23. depends_on:
  24. - hcp-mysql
  25. networks:
  26. cloud-net:
  27. ipv4_address: 172.18.0.6
  28. hcp-mysql:
  29. container_name: hcp-mysql
  30. image: mysql:5.7
  31. build:
  32. context: ./mysql
  33. ports:
  34. - "3306:3306"
  35. volumes:
  36. - ./mysql/conf:/etc/mysql/conf.d
  37. - ./mysql/logs:/logs
  38. - ./mysql/data:/var/lib/mysql
  39. - ./mysql/db:/docker-entrypoint-initdb.d
  40. command: [
  41. 'mysqld',
  42. '--innodb-buffer-pool-size=80M',
  43. '--character-set-server=utf8mb4',
  44. '--collation-server=utf8mb4_unicode_ci',
  45. '--default-time-zone=+8:00',
  46. '--lower-case-table-names=1'
  47. ]
  48. environment:
  49. MYSQL_DATABASE: 'vctgo_platform'
  50. MYSQL_ROOT_PASSWORD: password
  51. networks:
  52. cloud-net:
  53. ipv4_address: 172.18.0.2
  54. hcp-redis:
  55. container_name: hcp-redis
  56. image: redis
  57. build:
  58. context: ./redis
  59. ports:
  60. - "6379:6379"
  61. volumes:
  62. - ./redis/conf/redis.conf:/home/hcp/redis/redis.conf
  63. - ./redis/data:/data
  64. command: redis-server /home/hcp/redis/redis.conf
  65. networks:
  66. cloud-net:
  67. ipv4_address: 172.18.0.3
  68. hcp-nginx:
  69. container_name: hcp-nginx
  70. image: nginx
  71. build:
  72. context: ./nginx
  73. ports:
  74. - "8001:8001"
  75. volumes:
  76. - ./nginx/html/dist:/home/hcp/projects/hcp-ui
  77. - ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf
  78. - ./nginx/logs:/var/log/nginx
  79. - ./nginx/conf.d:/etc/nginx/conf.d
  80. depends_on:
  81. - hcp-gateway
  82. links:
  83. - hcp-gateway
  84. networks:
  85. cloud-net:
  86. ipv4_address: 172.18.0.4
  87. hcp-gateway:
  88. container_name: hcp-gateway
  89. build:
  90. context: hcp/gateway
  91. dockerfile: dockerfile
  92. ports:
  93. - "38080:38080"
  94. depends_on:
  95. - hcp-redis
  96. links:
  97. - hcp-redis
  98. environment:
  99. - NACOS_HOST=172.18.0.6
  100. - NACOS_PORT=8848
  101. - NETWORK_IP=192.168.1.4
  102. networks:
  103. cloud-net:
  104. ipv4_address: 172.18.0.5
  105. hcp-auth:
  106. container_name: hcp-auth
  107. build:
  108. context: hcp/auth
  109. dockerfile: dockerfile
  110. ports:
  111. - "39200:39200"
  112. depends_on:
  113. - hcp-redis
  114. links:
  115. - hcp-redis
  116. environment:
  117. - NACOS_HOST=172.18.0.6
  118. - NACOS_PORT=8848
  119. - NETWORK_IP=192.168.1.4
  120. networks:
  121. cloud-net:
  122. ipv4_address: 172.18.0.7
  123. hcp-system:
  124. container_name: hcp-system
  125. build:
  126. context: hcp/modules/system
  127. dockerfile: dockerfile
  128. ports:
  129. - "39201:39201"
  130. depends_on:
  131. - hcp-redis
  132. - hcp-mysql
  133. links:
  134. - hcp-redis
  135. - hcp-mysql
  136. - hcp-file
  137. environment:
  138. - NACOS_HOST=172.18.0.6
  139. - NACOS_PORT=8848
  140. - NETWORK_IP=192.168.1.4
  141. networks:
  142. cloud-net:
  143. ipv4_address: 172.18.0.8
  144. hcp-gen:
  145. container_name: hcp-gen
  146. build:
  147. context: hcp/modules/gen
  148. dockerfile: dockerfile
  149. ports:
  150. - "39202:39202"
  151. depends_on:
  152. - hcp-mysql
  153. links:
  154. - hcp-mysql
  155. environment:
  156. - NACOS_HOST=172.18.0.6
  157. - NACOS_PORT=8848
  158. - NETWORK_IP=192.168.1.4
  159. networks:
  160. cloud-net:
  161. ipv4_address: 172.18.0.9
  162. hcp-file:
  163. container_name: hcp-file
  164. build:
  165. context: hcp/modules/file
  166. dockerfile: dockerfile
  167. ports:
  168. - "39300:39300"
  169. volumes:
  170. - ./vctgo/uploadPath:/home/hcp/uploadPath
  171. environment:
  172. - NACOS_HOST=172.18.0.6
  173. - NACOS_PORT=8848
  174. - NETWORK_IP=192.168.1.4
  175. networks:
  176. cloud-net:
  177. ipv4_address: 172.18.0.10
  178. hcp-monitor:
  179. container_name: hcp-monitor
  180. build:
  181. context: hcp/visual/monitor
  182. dockerfile: dockerfile
  183. ports:
  184. - "39100:39100"
  185. environment:
  186. - NACOS_HOST=172.18.0.6
  187. - NACOS_PORT=8848
  188. - NETWORK_IP=192.168.1.4
  189. networks:
  190. cloud-net:
  191. ipv4_address: 172.18.0.11
  192. hcp-demo:
  193. container_name: hcp-demo
  194. build:
  195. context: hcp/demo
  196. dockerfile: dockerfile
  197. ports:
  198. - "39203:39203"
  199. depends_on:
  200. - hcp-redis
  201. - hcp-mysql
  202. links:
  203. - hcp-redis
  204. - hcp-mysql
  205. - hcp-file
  206. environment:
  207. - NACOS_HOST=172.18.0.6
  208. - NACOS_PORT=8848
  209. - NETWORK_IP=192.168.1.4
  210. networks:
  211. cloud-net:
  212. ipv4_address: 172.18.0.12
  213. hcp-job:
  214. container_name: hcp-job
  215. build:
  216. context: hcp/modules/job
  217. dockerfile: dockerfile
  218. ports:
  219. - "39204:39204"
  220. depends_on:
  221. - hcp-redis
  222. - hcp-mysql
  223. links:
  224. - hcp-redis
  225. - hcp-mysql
  226. - hcp-file
  227. environment:
  228. - NACOS_HOST=172.18.0.6
  229. - NACOS_PORT=8848
  230. - NETWORK_IP=192.168.1.4
  231. networks:
  232. cloud-net:
  233. ipv4_address: 172.18.0.13