docker-compose.yml 3.3 KB

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