docker-compose.yml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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. - "9849:9849"
  19. #depends_on:
  20. # - ruoyi-mysql
  21. ruoyi-mysql:
  22. container_name: ruoyi-mysql
  23. image: mysql:5.7
  24. build:
  25. context: ./mysql
  26. ports:
  27. - "3306:3306"
  28. volumes:
  29. - ./mysql/conf:/etc/mysql/conf.d
  30. - ./mysql/logs:/logs
  31. - ./mysql/data:/var/lib/mysql
  32. command: [
  33. 'mysqld',
  34. '--innodb-buffer-pool-size=80M',
  35. '--character-set-server=utf8mb4',
  36. '--collation-server=utf8mb4_unicode_ci',
  37. '--default-time-zone=+8:00',
  38. '--lower-case-table-names=1'
  39. ]
  40. environment:
  41. MYSQL_DATABASE: 'usky-cloud'
  42. MYSQL_ROOT_PASSWORD: password
  43. ruoyi-redis:
  44. container_name: ruoyi-redis
  45. image: redis
  46. build:
  47. context: ./redis
  48. ports:
  49. - "6379:6379"
  50. volumes:
  51. - ./redis/conf/redis.conf:/home/ruoyi/redis/redis.conf
  52. - ./redis/data:/data
  53. command: redis-server /home/ruoyi/redis/redis.conf
  54. ruoyi-ui:
  55. container_name: ruoyi-ui
  56. image: nginx
  57. build:
  58. context: ./nginx
  59. ports:
  60. - "13200:80"
  61. volumes:
  62. - /etc/hosts:/etc/hosts
  63. - ./nginx/html/dist:/home/ruoyi/projects/ruoyi-ui
  64. - ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf
  65. - ./nginx/logs:/var/log/nginx
  66. - ./nginx/conf.d:/etc/nginx/conf.d
  67. ruoyi-gateway:
  68. container_name: ruoyi-gateway
  69. build:
  70. context: ./ruoyi/gateway
  71. dockerfile: dockerfile
  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. ports:
  88. - "9886:9886"
  89. volumes:
  90. - /etc/localtime:/etc/localtime:ro
  91. - /etc/hosts:/etc/hosts
  92. depends_on:
  93. - ruoyi-redis
  94. - ruoyi-mysql
  95. - ruoyi-nacos
  96. links:
  97. - ruoyi-redis
  98. - ruoyi-mysql
  99. ruoyi-modules-gen:
  100. container_name: ruoyi-modules-gen
  101. build:
  102. context: ./ruoyi/modules/gen
  103. dockerfile: dockerfile
  104. ports:
  105. - "9202:9202"
  106. depends_on:
  107. - ruoyi-mysql
  108. links:
  109. - ruoyi-mysql
  110. ruoyi-modules-job:
  111. container_name: ruoyi-modules-job
  112. build:
  113. context: ./ruoyi/modules/job
  114. dockerfile: dockerfile
  115. ports:
  116. - "9203:9203"
  117. depends_on:
  118. - ruoyi-mysql
  119. links:
  120. - ruoyi-mysql
  121. ruoyi-modules-file:
  122. container_name: ruoyi-modules-file
  123. build:
  124. context: ./ruoyi/modules/file
  125. dockerfile: dockerfile
  126. ports:
  127. - "9300:9300"
  128. volumes:
  129. - ./ruoyi/uploadPath:/home/ruoyi/uploadPath
  130. ruoyi-visual-monitor:
  131. container_name: ruoyi-visual-monitor
  132. build:
  133. context: ./ruoyi/visual/monitor
  134. dockerfile: dockerfile
  135. ports:
  136. - "9100:9100"