docker-compose.yml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. # 使用说明 V4.0.0
  2. # 1. 使用docker-compose 宿主机不需要配置host来发现
  3. # 2. 无需修改源码,根目录 docker-compose up 即可
  4. # 3. 静静等待服务启动
  5. version: '2'
  6. services:
  7. lutao-mysql:
  8. build:
  9. context: ./db
  10. environment:
  11. MYSQL_ROOT_HOST: "%"
  12. MYSQL_ROOT_PASSWORD:
  13. restart: always
  14. container_name: lutao-mysql
  15. image: mysql:8.0.23
  16. security_opt:
  17. - seccomp:unconfined
  18. ports:
  19. - 3306:3306
  20. volumes:
  21. - ./lutao-mysql:/var/lib/mysql
  22. command: --lower_case_table_names=1
  23. accident-nginx:
  24. build:
  25. context: ./accident/accident-web
  26. restart: always
  27. container_name: accident-nginx
  28. image: accident-nginx
  29. ports:
  30. - 8090:8090
  31. # wuye-server:
  32. # build:
  33. # context: ./wuye/c#/wuye-c#
  34. # restart: always
  35. # container_name: wuye-server
  36. # image: wuye-server:1.0.0
  37. # ports:
  38. # - 8060:80
  39. cloud-redis:
  40. image: redis:6.2
  41. container_name: cloud-redis
  42. restart: always
  43. environment:
  44. - TZ=Asia/Shanghai
  45. ports:
  46. - "6379:6379"
  47. volumes:
  48. - ./data/redis/redis.conf:/usr/local/etc/redis/redis.conf
  49. - ./data/redis/data:/data:rw
  50. - ./data/redis/logs:/logs
  51. command: redis-server /usr/local/etc/redis/redis.conf --requirepass "haspm123"
  52. nacos:
  53. hostname: nacos
  54. restart: always
  55. container_name: nacos
  56. image: nacos/nacos-server:v2.1.0
  57. env_file:
  58. - ./accident/nacos/env/nacos-standlone-mysql.env
  59. volumes:
  60. - ./accident/nacos/standalone-logs/:/home/nacos/logs
  61. - ./accident/nacos/init.d/custom.properties:/home/nacos/init.d/custom.properties
  62. ports:
  63. - "8848:8848"
  64. - "9848:9848"
  65. - "9555:9555"
  66. nacos1:
  67. hostname: nacos1
  68. image: nacos/nacos-server:v2.1.0
  69. container_name: nacos1
  70. env_file:
  71. - ./accident/nacos/env/nacos-standlone-mysql.env
  72. volumes:
  73. - ./accident/nacos/standalone-logs/:/home/nacos/logs
  74. - ./accident/nacos/init.d/custom.properties:/home/nacos/init.d/custom.properties
  75. ports:
  76. - "8849:8848"
  77. - "9849:9848"
  78. restart: always
  79. #网关服务
  80. cloud-gateway:
  81. build:
  82. context: ./accident/cloud-gateway
  83. restart: always
  84. container_name: cloud-gateway
  85. image: cloud-gateway
  86. ports:
  87. - "9999:9999"
  88. cloud-gateway1:
  89. build:
  90. context: ./accident/cloud-gateway
  91. container_name: cloud-gateway1
  92. image: cloud-gateway
  93. ports:
  94. - "9900:9999"
  95. ##认证中心
  96. cloud-auth:
  97. build:
  98. context: ./accident/cloud-auth
  99. restart: always
  100. container_name: cloud-auth
  101. image: cloud-auth
  102. ports:
  103. - "3000:3000"
  104. cloud-auth1:
  105. build:
  106. context: ./accident/cloud-auth
  107. restart: always
  108. container_name: cloud-auth1
  109. image: cloud-auth
  110. ports:
  111. - "3000:3000"
  112. #权限管理
  113. cloud-upms:
  114. build:
  115. context: ./accident/cloud-upms
  116. container_name: cloud-upms
  117. image: cloud-upms
  118. ports:
  119. - "4000:4000"
  120. cloud-upms1:
  121. build:
  122. context: ./accident/cloud-upms
  123. restart: always
  124. container_name: cloud-upms1
  125. image: cloud-upms
  126. ports:
  127. - "4000:4000"
  128. ##首页
  129. cloud-index:
  130. build:
  131. context: ./accident/cloud-index
  132. container_name: cloud-index
  133. image: cloud-index
  134. ports:
  135. - "9001:9001"
  136. ## 事故资源
  137. cloud-res:
  138. build:
  139. context: ./accident/cloud-res
  140. container_name: cloud-res
  141. image: cloud-res
  142. ports:
  143. - "9003:9003"
  144. ## 事故字典
  145. cloud-dict:
  146. build:
  147. context: ./accident/cloud-dict
  148. container_name: cloud-dict
  149. image: cloud-dict
  150. ports:
  151. - "9005:9005"
  152. ## 标准库
  153. cloud-collect:
  154. build:
  155. context: ./accident/cloud-collect
  156. container_name: cloud-collect
  157. image: cloud-collect
  158. ports:
  159. - "9007:9007"
  160. ## 事故管理
  161. cloud-accident:
  162. build:
  163. context: ./accident/cloud-accident
  164. container_name: cloud-accident
  165. image: cloud-accident
  166. ports:
  167. - "9009:9009"
  168. ## 事故管理
  169. cloud-storage:
  170. build:
  171. context: ./accident/cloud-storage
  172. container_name: cloud-storage
  173. image: cloud-storage
  174. ports:
  175. - "9011:9011"
  176. ## 事故取证
  177. cloud-evidence:
  178. build:
  179. context: ./accident/cloud-evidence
  180. container_name: cloud-evidence
  181. image: cloud-evidence
  182. ports:
  183. - "9013:9013"
  184. #三方服务器
  185. # cloud-mqtt:
  186. # container_name: cloud-mqtt
  187. # image: emqx/emqx:v4.0.0
  188. # restart: always
  189. # ports:
  190. # - "1883:1883"
  191. # - "8083:8083"
  192. cloud-mqtt:
  193. build:
  194. context: ./accident/cloud-mqtt
  195. container_name: cloud-mqtt
  196. image: cloud-mqtt
  197. restart: always
  198. ports:
  199. - "9876:9876"
  200. - "8083:8083"
  201. - "8083:8083"
  202. ## 事故鉴定
  203. cloud-identify:
  204. build:
  205. context: ./accident/cloud-identify
  206. container_name: cloud-identify
  207. image: cloud-identify
  208. ports:
  209. - "9014:9014"
  210. ## 消息中心
  211. cloud-message:
  212. build:
  213. context: ./accident/cloud-message
  214. container_name: cloud-message
  215. image: cloud-message
  216. ports:
  217. - "9017:9017"
  218. # haspm-oa-platform:
  219. # build:
  220. # context: ./haspm-visual/haspm-oa-platform
  221. # restart: always
  222. # image: haspm-oa-platform
  223. # container_name: haspm-oa-platform
  224. ##分布式事物管理
  225. # haspm-tx-manager:
  226. # build:
  227. # context: ./haspm-visual/haspm-tx-manager
  228. # restart: always
  229. # image: haspm-tx-manager
  230. # container_name: haspm-tx-manager
  231. # ports:
  232. # - 5004:5004
  233. # - 9998:9998
  234. ##哨兵流控
  235. # haspm-sentinel:
  236. # build:
  237. # context: ./haspm-visual/haspm-sentinel-dashboard
  238. # restart: always
  239. # image: haspm-sentinel
  240. # container_name: haspm-sentinel
  241. # ports:
  242. # - 5020:5020
  243. ##消息系统
  244. # haspm-message:
  245. # build:
  246. # context: ./haspm-message
  247. # restart: always
  248. # container_name: haspm-message
  249. # image: haspm-message
  250. # mongo服务
  251. # haspm-mongo:
  252. # container_name: haspm-mongo
  253. # image: mongo:4.4.14 # 可以修改为自己需要的版本
  254. # restart: always
  255. # ports:
  256. # - 27017:27017
  257. # volumes:
  258. # - /etc/localtime:/etc/localtime # 时区
  259. # - /home/guoyc/haspm-mongo/db:/data/db # 挂载数据目录
  260. # - /home/guoyc/haspm-mongo/log:/var/log/mongodb # 挂载日志目录
  261. # - /home/guoyc/haspm-mongo/config:/etc/mongo # 挂载配置目录
  262. # - /home/guoyc/haspm-mongo/backup:/data/backup # 挂载备份
  263. # environment:
  264. # MONGO_INITDB_ROOT_USERNAME: mongoadmin
  265. # MONGO_INITDB_ROOT_PASSWORD: mongoadmin