docker-compose.yml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. version: '3'
  2. services:
  3. mysql:
  4. image: mysql:8.0.33
  5. container_name: mysql
  6. environment:
  7. # 时区上海
  8. TZ: Asia/Shanghai
  9. # root 密码
  10. MYSQL_ROOT_PASSWORD: root
  11. # 初始化数据库(后续的初始化sql会在这个库执行)
  12. MYSQL_DATABASE: ry-vue
  13. ports:
  14. - "3306:3306"
  15. volumes:
  16. # 数据挂载
  17. - /docker/mysql/data/:/var/lib/mysql/
  18. # 配置挂载
  19. - /docker/mysql/conf/:/etc/mysql/conf.d/
  20. command:
  21. # 将mysql8.0默认密码策略 修改为 原先 策略 (mysql8.0对其默认策略做了更改 会导致密码无法匹配)
  22. --default-authentication-plugin=mysql_native_password
  23. --character-set-server=utf8mb4
  24. --collation-server=utf8mb4_general_ci
  25. --explicit_defaults_for_timestamp=true
  26. --lower_case_table_names=1
  27. privileged: true
  28. network_mode: "host"
  29. nginx-web:
  30. image: nginx:1.23.4
  31. container_name: nginx-web
  32. environment:
  33. # 时区上海
  34. TZ: Asia/Shanghai
  35. ports:
  36. - "80:80"
  37. - "443:443"
  38. volumes:
  39. # 证书映射
  40. - /docker/nginx/cert:/etc/nginx/cert
  41. # 配置文件映射
  42. - /docker/nginx/conf/nginx.conf:/etc/nginx/nginx.conf
  43. # 页面目录
  44. - /docker/nginx/html:/usr/share/nginx/html
  45. # 日志目录
  46. - /docker/nginx/log:/var/log/nginx
  47. privileged: true
  48. network_mode: "host"
  49. redis:
  50. image: redis:6.2.12
  51. container_name: redis
  52. ports:
  53. - "6379:6379"
  54. environment:
  55. # 时区上海
  56. TZ: Asia/Shanghai
  57. volumes:
  58. # 配置文件
  59. - /docker/redis/conf:/redis/config:rw
  60. # 数据文件
  61. - /docker/redis/data/:/redis/data/:rw
  62. command: "redis-server /redis/config/redis.conf"
  63. privileged: true
  64. network_mode: "host"
  65. minio:
  66. image: minio/minio:RELEASE.2023-04-13T03-08-07Z
  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.2.0
  99. container_name: ruoyi-server1
  100. environment:
  101. # 时区上海
  102. TZ: Asia/Shanghai
  103. SERVER_PORT: 8080
  104. volumes:
  105. # 配置文件
  106. - /docker/server1/logs/:/ruoyi/server/logs/
  107. # skywalking 探针
  108. # - /docker/skywalking/agent/:/ruoyi/skywalking/agent
  109. privileged: true
  110. network_mode: "host"
  111. ruoyi-server2:
  112. image: ruoyi/ruoyi-server:5.2.0
  113. container_name: ruoyi-server2
  114. environment:
  115. # 时区上海
  116. TZ: Asia/Shanghai
  117. SERVER_PORT: 8081
  118. volumes:
  119. # 配置文件
  120. - /docker/server2/logs/:/ruoyi/server/logs/
  121. # skywalking 探针
  122. # - /docker/skywalking/agent/:/ruoyi/skywalking/agent
  123. privileged: true
  124. network_mode: "host"
  125. ruoyi-monitor-admin:
  126. image: ruoyi/ruoyi-monitor-admin:5.2.0
  127. container_name: ruoyi-monitor-admin
  128. environment:
  129. # 时区上海
  130. TZ: Asia/Shanghai
  131. volumes:
  132. # 配置文件
  133. - /docker/monitor/logs/:/ruoyi/monitor/logs
  134. privileged: true
  135. network_mode: "host"
  136. ruoyi-snailjob-server:
  137. image: ruoyi/ruoyi-snailjob-server:5.2.0
  138. container_name: ruoyi-snailjob-server
  139. environment:
  140. # 时区上海
  141. TZ: Asia/Shanghai
  142. ports:
  143. - "8800:8800"
  144. - "1788:1788"
  145. volumes:
  146. - /docker/snailjob/logs/:/ruoyi/snailjob/logs
  147. privileged: true
  148. network_mode: "host"