docker-compose.yml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. version: '3.3'
  2. services:
  3. redis1:
  4. image: redis
  5. restart: always
  6. container_name: redis1
  7. volumes:
  8. - ${store}/redis1:/data
  9. - ./conf:/usr/local/etc/redis
  10. - ./cluster.sh:/opt/cluster.sh
  11. - ./.env:/opt/.env
  12. command: redis-server /usr/local/etc/redis/redis-6379.conf
  13. network_mode: "host"
  14. ports:
  15. - 6379:6379
  16. - 16379:16379
  17. redis2:
  18. image: redis
  19. restart: always
  20. container_name: redis2
  21. volumes:
  22. - ${store}/redis2:/data
  23. - ./conf:/usr/local/etc/redis
  24. command: redis-server /usr/local/etc/redis/redis-6380.conf
  25. network_mode: "host"
  26. ports:
  27. - 6380:6380
  28. - 16380:16380
  29. redis3:
  30. image: redis
  31. restart: always
  32. container_name: redis3
  33. volumes:
  34. - ${store}/redis3:/data
  35. - ./conf:/usr/local/etc/redis
  36. command: redis-server /usr/local/etc/redis/redis-6381.conf
  37. network_mode: "host"
  38. ports:
  39. - 6381:6381
  40. - 16381:16381
  41. redis4:
  42. image: redis
  43. restart: always
  44. container_name: redis4
  45. volumes:
  46. - ${store}/redis4:/data
  47. - ./conf:/usr/local/etc/redis
  48. command: redis-server /usr/local/etc/redis/redis-6382.conf
  49. network_mode: "host"
  50. ports:
  51. - 6382:6382
  52. - 16382:16382
  53. redis5:
  54. image: redis
  55. restart: always
  56. container_name: redis5
  57. volumes:
  58. - ${store}/redis5:/data
  59. - ./conf:/usr/local/etc/redis
  60. command: redis-server /usr/local/etc/redis/redis-6383.conf
  61. network_mode: "host"
  62. ports:
  63. - 6383:6383
  64. - 16383:16383
  65. redis6:
  66. image: redis
  67. restart: always
  68. hostname: redis6
  69. container_name: redis6
  70. volumes:
  71. - ${store}/redis6:/data
  72. - ./conf:/usr/local/etc/redis
  73. command: redis-server /usr/local/etc/redis/redis-6384.conf
  74. network_mode: "host"
  75. ports:
  76. - 6384:6384
  77. - 16384:16384