docker-compose.yml.bak 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. version: "3"
  2. services:
  3. mysql:
  4. hostname: mysql
  5. image: mysql:5.7
  6. # network_mode: "host" # 如果需要容器使用宿主机IP(内网IP),则可以配置此项
  7. container_name: mysql # 指定容器名称,如果不设置此参数,则由系统自动生成
  8. restart: unless-stopped # 设置容器自启模式
  9. command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci # 设置utf8字符集
  10. environment:
  11. - TZ=Asia/Shanghai # 设置容器时区与宿主机保持一致
  12. - MYSQL_ROOT_PASSWORD=cocci1234 # 设置root密码
  13. volumes:
  14. - /etc/localtime:/etc/localtime:ro # 设置容器时区与宿主机保持一致
  15. - /opt/mysql/data:/var/lib/mysql # 映射数据库保存目录到宿主机,防止数据丢失
  16. - /opt/mysql/config/mysqld.cnf:/etc/mysql/mysql.conf.d/mysqld.cnf # 映射数据库配置文件
  17. ports:
  18. - "3933:3306"
  19. redis-server:
  20. image: redis:4
  21. command: redis-server /usr/local/etc/redis/redis.conf
  22. hostname: redis-server
  23. ports:
  24. - 6379:6379
  25. networks:
  26. - frontend
  27. restart: always
  28. volumes:
  29. # 目录映射
  30. - "/home/app/redis/conf:/usr/local/etc/redis"
  31. - "/home/app/redis/data:/data"
  32. - "/home/app/redis/log:/var/log/redis/"
  33. - /etc/timezone:/etc/timezone
  34. - /etc/localtime:/etc/localtime
  35. deploy:
  36. replicas: 1
  37. update_config:
  38. parallelism: 2
  39. delay: 10s
  40. restart_policy:
  41. condition: on-failure
  42. service-center:
  43. image: registry.cn-shenzhen.aliyuncs.com/guqi/aak-service-center:latest
  44. hostname: service-center
  45. ports:
  46. - 8761:8761
  47. networks:
  48. - frontend
  49. volumes:
  50. - "/home/app/applications/service-center/logs/:/log/"
  51. - /etc/timezone:/etc/timezone
  52. - /etc/localtime:/etc/localtime
  53. restart: always
  54. deploy:
  55. replicas: 1
  56. restart_policy:
  57. condition: on-failure
  58. aak-core-service:
  59. image: registry.cn-shenzhen.aliyuncs.com/guqi/aak-core-service:latest
  60. ports:
  61. - 8083:8083
  62. links:
  63. - "service-center"
  64. - "redis-server"
  65. depends_on:
  66. - redis-server
  67. networks:
  68. - frontend
  69. volumes:
  70. - "/home/app/applications/aak-core-service/logs/:/log/"
  71. - /etc/timezone:/etc/timezone
  72. - /etc/localtime:/etc/localtime
  73. restart: always
  74. deploy:
  75. replicas: 1
  76. restart_policy:
  77. condition: on-failure
  78. aak-saas:
  79. image: registry.cn-shenzhen.aliyuncs.com/guqi/aak-saas:latest
  80. ports:
  81. - 8001:8001
  82. links:
  83. - "service-center"
  84. - "redis-server"
  85. networks:
  86. - frontend
  87. volumes:
  88. - /home/app/applications/aak-saas/logs/:/log/
  89. - /etc/timezone:/etc/timezone
  90. - /etc/localtime:/etc/localtime
  91. restart: always
  92. deploy:
  93. replicas: 1
  94. restart_policy:
  95. condition: on-failure
  96. aak-app:
  97. image: registry.cn-shenzhen.aliyuncs.com/guqi/aak-app:latest
  98. ports:
  99. - 8004:8004
  100. links:
  101. - "service-center"
  102. - "redis-server"
  103. networks:
  104. - frontend
  105. volumes:
  106. - /home/app/applications/aak-app/logs/:/log/
  107. - /etc/timezone:/etc/timezone
  108. - /etc/localtime:/etc/localtime
  109. restart: always
  110. deploy:
  111. replicas: 1
  112. restart_policy:
  113. condition: on-failure
  114. aak-admin:
  115. image: registry.cn-shenzhen.aliyuncs.com/guqi/aak-admin:latest
  116. ports:
  117. - 8002:8002
  118. links:
  119. - "service-center"
  120. - "redis-server"
  121. networks:
  122. - frontend
  123. volumes:
  124. - /home/app/applications/aak-admin/logs/:/log/
  125. - /etc/timezone:/etc/timezone
  126. - /etc/localtime:/etc/localtime
  127. restart: always
  128. deploy:
  129. replicas: 1
  130. restart_policy:
  131. condition: on-failure
  132. # aak-civil:
  133. # image: registry.cn-shenzhen.aliyuncs.com/guqi/aak-civil:latest
  134. # ports:
  135. # - 8026:8026
  136. # links:
  137. # - "service-center"
  138. # - "redis-server"
  139. # networks:
  140. # - frontend
  141. # volumes:
  142. # - /home/app/applications/aak-civil/logs/:/log/
  143. # - /etc/timezone:/etc/timezone
  144. # - /etc/localtime:/etc/localtime
  145. # restart: always
  146. # deploy:
  147. # replicas: 1
  148. # restart_policy:
  149. # condition: on-failure
  150. aak-das:
  151. image: registry.cn-shenzhen.aliyuncs.com/guqi/aak-das:latest
  152. ports:
  153. - 8005:8005
  154. - 8888:8888
  155. links:
  156. - "service-center"
  157. - "redis-server"
  158. networks:
  159. - frontend
  160. volumes:
  161. - /home/app/applications/aak-das/logs/:/log/
  162. - /etc/timezone:/etc/timezone
  163. - /etc/localtime:/etc/localtime
  164. restart: always
  165. deploy:
  166. replicas: 1
  167. restart_policy:
  168. condition: on-failure
  169. aak-task-service:
  170. image: registry.cn-shenzhen.aliyuncs.com/guqi/aak-task-service:latest
  171. ports:
  172. - 8092:8092
  173. links:
  174. - "service-center"
  175. networks:
  176. - frontend
  177. volumes:
  178. - /home/app/applications/aak-task-service/logs/:/log/
  179. - /etc/timezone:/etc/timezone
  180. - /etc/localtime:/etc/localtime
  181. restart: always
  182. deploy:
  183. replicas: 1
  184. restart_policy:
  185. condition: on-failure
  186. networks:
  187. frontend:
  188. backend:
  189. volumes:
  190. db-data: