docker-compose.yml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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_ROOT_PASSWORD: Dzx123!@#
  40. ruoyi-redis:
  41. container_name: ruoyi-redis
  42. image: redis
  43. build:
  44. context: ./redis
  45. ports:
  46. - "6379:6379"
  47. volumes:
  48. - ./redis/conf/redis.conf:/home/ruoyi/redis/redis.conf
  49. - ./redis/data:/data
  50. command: redis-server /home/ruoyi/redis/redis.conf
  51. ruoyi-nginx:
  52. container_name: ruoyi-nginx
  53. image: nginx
  54. build:
  55. context: ./nginx
  56. ports:
  57. - "80:80"
  58. volumes:
  59. - ./nginx/html/dist:/home/ruoyi/projects/ruoyi-ui
  60. - ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf
  61. - ./nginx/logs:/var/log/nginx
  62. - ./nginx/conf.d:/etc/nginx/conf.d
  63. depends_on:
  64. - ruoyi-gateway
  65. links:
  66. - ruoyi-gateway
  67. ruoyi-gateway:
  68. container_name: ruoyi-gateway
  69. build:
  70. context: ./ruoyi/gateway
  71. dockerfile: dockerfile
  72. ports:
  73. - "8080:8080"
  74. depends_on:
  75. - ruoyi-redis
  76. links:
  77. - ruoyi-redis
  78. ruoyi-auth:
  79. container_name: ruoyi-auth
  80. build:
  81. context: ./ruoyi/auth
  82. dockerfile: dockerfile
  83. ports:
  84. - "9200:9200"
  85. depends_on:
  86. - ruoyi-redis
  87. links:
  88. - ruoyi-redis
  89. ruoyi-modules-system:
  90. container_name: ruoyi-modules-system
  91. build:
  92. context: ./ruoyi/modules/system
  93. dockerfile: dockerfile
  94. ports:
  95. - "9201:9201"
  96. depends_on:
  97. - ruoyi-redis
  98. - ruoyi-mysql
  99. links:
  100. - ruoyi-redis
  101. - ruoyi-mysql
  102. ruoyi-modules-gen:
  103. container_name: ruoyi-modules-gen
  104. build:
  105. context: ./ruoyi/modules/gen
  106. dockerfile: dockerfile
  107. ports:
  108. - "9202:9202"
  109. depends_on:
  110. - ruoyi-mysql
  111. links:
  112. - ruoyi-mysql
  113. ruoyi-modules-job:
  114. container_name: ruoyi-modules-job
  115. build:
  116. context: ./ruoyi/modules/job
  117. dockerfile: dockerfile
  118. ports:
  119. - "9203:9203"
  120. depends_on:
  121. - ruoyi-mysql
  122. links:
  123. - ruoyi-mysql
  124. ruoyi-visual-monitor:
  125. container_name: ruoyi-visual-monitor
  126. build:
  127. context: ./ruoyi/visual/monitor
  128. dockerfile: dockerfile
  129. ports:
  130. - "9100:9100"