docker-compose.yml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. version : '3.8'
  2. services:
  3. ruoyi-nacos:
  4. container_name: ruoyi-nacos
  5. image: nacos/nacos-server
  6. build:
  7. context: ./nacos
  8. #environment:
  9. # - MODE=standalone
  10. volumes:
  11. - ./nacos/logs/:/home/nacos/logs
  12. - ./nacos/conf/application.properties:/home/nacos/conf/application.properties
  13. - /etc/localtime:/etc/localtime:ro
  14. - /etc/hosts:/etc/hosts
  15. ports:
  16. - "8848:8848"
  17. - "9848:9848"
  18. depends_on:
  19. - ruoyi-mysql
  20. ruoyi-mysql:
  21. container_name: ruoyi-mysql
  22. image: mysql:5.7
  23. build:
  24. context: ./mysql
  25. ports:
  26. - "3306:3306"
  27. volumes:
  28. - ./mysql/conf:/etc/mysql/conf.d
  29. - ./mysql/logs:/logs
  30. - ./mysql/data:/var/lib/mysql
  31. command: [
  32. 'mysqld',
  33. '--innodb-buffer-pool-size=80M',
  34. '--character-set-server=utf8mb4',
  35. '--collation-server=utf8mb4_unicode_ci',
  36. '--default-time-zone=+8:00',
  37. '--lower-case-table-names=1'
  38. ]
  39. environment:
  40. MYSQL_DATABASE: 'usky-cloud'
  41. MYSQL_ROOT_PASSWORD: password
  42. ruoyi-redis:
  43. container_name: ruoyi-redis
  44. image: redis
  45. build:
  46. context: ./redis
  47. ports:
  48. - "6379:6379"
  49. volumes:
  50. - ./redis/conf/redis.conf:/home/ruoyi/redis/redis.conf
  51. - ./redis/data:/data
  52. command: redis-server /home/ruoyi/redis/redis.conf
  53. ruoyi-ui:
  54. container_name: ruoyi-ui
  55. image: nginx
  56. build:
  57. context: ./nginx
  58. ports:
  59. - "80:80"
  60. volumes:
  61. - /etc/hosts:/etc/hosts
  62. - ./nginx/html/dist:/home/ruoyi/projects/ruoyi-ui
  63. - ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf
  64. - ./nginx/logs:/var/log/nginx
  65. - ./nginx/conf.d:/etc/nginx/conf.d
  66. ruoyi-gateway:
  67. container_name: ruoyi-gateway
  68. build:
  69. context: ./ruoyi/gateway
  70. dockerfile: dockerfile
  71. network_mode: host
  72. # ports:
  73. # - "9150:9150"
  74. volumes:
  75. - /etc/localtime:/etc/localtime:ro
  76. - /etc/hosts:/etc/hosts
  77. depends_on:
  78. - ruoyi-redis
  79. - ruoyi-nacos
  80. #links:
  81. # - ruoyi-redis
  82. ruoyi-system:
  83. container_name: ruoyi-system
  84. build:
  85. context: ./ruoyi/modules/system
  86. dockerfile: dockerfile
  87. network_mode: host
  88. #ports:
  89. # - "9886:9886"
  90. volumes:
  91. - /etc/localtime:/etc/localtime:ro
  92. - /etc/hosts:/etc/hosts
  93. depends_on:
  94. - ruoyi-redis
  95. - ruoyi-mysql
  96. - ruoyi-nacos
  97. # links:
  98. # - ruoyi-redis
  99. # - ruoyi-mysql
  100. ruoyi-modules-gen:
  101. container_name: ruoyi-modules-gen
  102. build:
  103. context: ./ruoyi/modules/gen
  104. dockerfile: dockerfile
  105. ports:
  106. - "9202:9202"
  107. depends_on:
  108. - ruoyi-mysql
  109. links:
  110. - ruoyi-mysql
  111. ruoyi-modules-job:
  112. container_name: ruoyi-modules-job
  113. build:
  114. context: ./ruoyi/modules/job
  115. dockerfile: dockerfile
  116. ports:
  117. - "9203:9203"
  118. depends_on:
  119. - ruoyi-mysql
  120. links:
  121. - ruoyi-mysql
  122. ruoyi-modules-file:
  123. container_name: ruoyi-modules-file
  124. build:
  125. context: ./ruoyi/modules/file
  126. dockerfile: dockerfile
  127. ports:
  128. - "9300:9300"
  129. volumes:
  130. - ./ruoyi/uploadPath:/home/ruoyi/uploadPath
  131. ruoyi-visual-monitor:
  132. container_name: ruoyi-visual-monitor
  133. build:
  134. context: ./ruoyi/visual/monitor
  135. dockerfile: dockerfile
  136. ports:
  137. - "9100:9100"