docker-compose.yml 3.3 KB

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