docker-compose.yml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. services:
  2. mysql:
  3. image: mysql:8.0.42
  4. container_name: mysql
  5. environment:
  6. # 时区上海
  7. TZ: Asia/Shanghai
  8. # root 密码
  9. MYSQL_ROOT_PASSWORD: root
  10. # 初始化数据库(后续的初始化sql会在这个库执行)
  11. MYSQL_DATABASE: ry-vue
  12. ports:
  13. - "3306:3306"
  14. volumes:
  15. # 数据挂载
  16. - /docker/mysql/data/:/var/lib/mysql/
  17. # 配置挂载
  18. - /docker/mysql/conf/:/etc/mysql/conf.d/
  19. command:
  20. # 将mysql8.0默认密码策略 修改为 原先 策略 (mysql8.0对其默认策略做了更改 会导致密码无法匹配)
  21. --default-authentication-plugin=mysql_native_password
  22. --character-set-server=utf8mb4
  23. --collation-server=utf8mb4_general_ci
  24. --explicit_defaults_for_timestamp=true
  25. --lower_case_table_names=1
  26. privileged: true
  27. network_mode: "host"
  28. nginx-web:
  29. image: nginx:1.23.4
  30. container_name: nginx-web
  31. environment:
  32. # 时区上海
  33. TZ: Asia/Shanghai
  34. ports:
  35. - "80:80"
  36. - "443:443"
  37. volumes:
  38. # 证书映射
  39. - /docker/nginx/cert:/etc/nginx/cert
  40. # 配置文件映射
  41. - /docker/nginx/conf/nginx.conf:/etc/nginx/nginx.conf
  42. # 页面目录
  43. - /docker/nginx/html:/usr/share/nginx/html
  44. # 日志目录
  45. - /docker/nginx/log:/var/log/nginx
  46. privileged: true
  47. network_mode: "host"
  48. redis:
  49. image: redis:7.2.8
  50. container_name: redis
  51. ports:
  52. - "6379:6379"
  53. environment:
  54. # 时区上海
  55. TZ: Asia/Shanghai
  56. volumes:
  57. # 配置文件
  58. - /docker/redis/conf:/redis/config:rw
  59. # 数据文件
  60. - /docker/redis/data/:/redis/data/:rw
  61. command: "redis-server /redis/config/redis.conf"
  62. privileged: true
  63. network_mode: "host"
  64. minio:
  65. # minio 最后一个未阉割版本 不能再进行升级 在往上的版本功能被阉割
  66. image: minio/minio:RELEASE.2025-04-22T22-12-26Z
  67. container_name: minio
  68. ports:
  69. # api 端口
  70. - "9000:9000"
  71. # 控制台端口
  72. - "9001:9001"
  73. environment:
  74. # 时区上海
  75. TZ: Asia/Shanghai
  76. # 管理后台用户名
  77. MINIO_ROOT_USER: ruoyi
  78. # 管理后台密码,最小8个字符
  79. MINIO_ROOT_PASSWORD: ruoyi123
  80. # https需要指定域名
  81. #MINIO_SERVER_URL: "https://xxx.com:9000"
  82. #MINIO_BROWSER_REDIRECT_URL: "https://xxx.com:9001"
  83. # 开启压缩 on 开启 off 关闭
  84. MINIO_COMPRESS: "off"
  85. # 扩展名 .pdf,.doc 为空 所有类型均压缩
  86. MINIO_COMPRESS_EXTENSIONS: ""
  87. # mime 类型 application/pdf 为空 所有类型均压缩
  88. MINIO_COMPRESS_MIME_TYPES: ""
  89. volumes:
  90. # 映射当前目录下的data目录至容器内/data目录
  91. - /docker/minio/data:/data
  92. # 映射配置目录
  93. - /docker/minio/config:/root/.minio/
  94. command: server --address ':9000' --console-address ':9001' /data # 指定容器中的目录 /data
  95. privileged: true
  96. network_mode: "host"
  97. ruoyi-server1:
  98. image: ruoyi/ruoyi-server:5.4.1
  99. container_name: ruoyi-server1
  100. environment:
  101. # 时区上海
  102. TZ: Asia/Shanghai
  103. SERVER_PORT: 8080
  104. SNAIL_PORT: 28080
  105. volumes:
  106. # 配置文件
  107. - /docker/server1/logs/:/ruoyi/server/logs/
  108. # skywalking 探针
  109. # - /docker/skywalking/agent/:/ruoyi/skywalking/agent
  110. privileged: true
  111. network_mode: "host"
  112. ruoyi-server2:
  113. image: ruoyi/ruoyi-server:5.4.1
  114. container_name: ruoyi-server2
  115. environment:
  116. # 时区上海
  117. TZ: Asia/Shanghai
  118. SERVER_PORT: 8081
  119. SNAIL_PORT: 28081
  120. volumes:
  121. # 配置文件
  122. - /docker/server2/logs/:/ruoyi/server/logs/
  123. # skywalking 探针
  124. # - /docker/skywalking/agent/:/ruoyi/skywalking/agent
  125. privileged: true
  126. network_mode: "host"
  127. ruoyi-monitor-admin:
  128. image: ruoyi/ruoyi-monitor-admin:5.4.1
  129. container_name: ruoyi-monitor-admin
  130. environment:
  131. # 时区上海
  132. TZ: Asia/Shanghai
  133. volumes:
  134. # 配置文件
  135. - /docker/monitor/logs/:/ruoyi/monitor/logs
  136. privileged: true
  137. network_mode: "host"
  138. ruoyi-snailjob-server:
  139. image: ruoyi/ruoyi-snailjob-server:5.4.1
  140. container_name: ruoyi-snailjob-server
  141. environment:
  142. # 时区上海
  143. TZ: Asia/Shanghai
  144. ports:
  145. - "8800:8800"
  146. - "17888:17888"
  147. volumes:
  148. - /docker/snailjob/logs/:/ruoyi/snailjob/logs
  149. privileged: true
  150. network_mode: "host"