docker-compose.yml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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-nginx:
  53. container_name: ruoyi-nginx
  54. image: nginx
  55. build:
  56. context: ./nginx
  57. ports:
  58. - "80:80"
  59. volumes:
  60. - ./nginx/html/dist:/home/ruoyi/projects/ruoyi-ui
  61. - ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf
  62. - ./nginx/logs:/var/log/nginx
  63. - ./nginx/conf.d:/etc/nginx/conf.d
  64. ruoyi-gateway:
  65. container_name: ruoyi-gateway
  66. build:
  67. context: ./ruoyi/gateway
  68. dockerfile: dockerfile
  69. ports:
  70. - "9150:9150"
  71. volumes:
  72. - /etc/localtime:/etc/localtime:ro
  73. - /etc/hosts:/etc/hosts
  74. depends_on:
  75. - ruoyi-redis
  76. links:
  77. - ruoyi-redis
  78. ruoyi-system:
  79. container_name: ruoyi-system
  80. build:
  81. context: ./ruoyi/modules/system
  82. dockerfile: dockerfile
  83. ports:
  84. - "9886:9886"
  85. volumes:
  86. - /etc/localtime:/etc/localtime:ro
  87. - /etc/hosts:/etc/hosts
  88. depends_on:
  89. - ruoyi-redis
  90. - ruoyi-mysql
  91. links:
  92. - ruoyi-redis
  93. - ruoyi-mysql
  94. ruoyi-modules-gen:
  95. container_name: ruoyi-modules-gen
  96. build:
  97. context: ./ruoyi/modules/gen
  98. dockerfile: dockerfile
  99. ports:
  100. - "9202:9202"
  101. depends_on:
  102. - ruoyi-mysql
  103. links:
  104. - ruoyi-mysql
  105. ruoyi-modules-job:
  106. container_name: ruoyi-modules-job
  107. build:
  108. context: ./ruoyi/modules/job
  109. dockerfile: dockerfile
  110. ports:
  111. - "9203:9203"
  112. depends_on:
  113. - ruoyi-mysql
  114. links:
  115. - ruoyi-mysql
  116. ruoyi-modules-file:
  117. container_name: ruoyi-modules-file
  118. build:
  119. context: ./ruoyi/modules/file
  120. dockerfile: dockerfile
  121. ports:
  122. - "9300:9300"
  123. volumes:
  124. - ./ruoyi/uploadPath:/home/ruoyi/uploadPath
  125. ruoyi-visual-monitor:
  126. container_name: ruoyi-visual-monitor
  127. build:
  128. context: ./ruoyi/visual/monitor
  129. dockerfile: dockerfile
  130. ports:
  131. - "9100:9100"