docker-compose.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. version: '3'
  2. services:
  3. sentinel1:
  4. image: redis:5.0.11
  5. container_name: redis-sentinel-1
  6. ports:
  7. - 0.0.0.0:26379:26379
  8. command: redis-sentinel /usr/local/etc/redis/sentinel.conf
  9. volumes:
  10. - ./sentinel1.conf:/usr/local/etc/redis/sentinel.conf
  11. sentinel2:
  12. image: redis:5.0.11
  13. container_name: redis-sentinel-2
  14. ports:
  15. - 0.0.0.0:26380:26380
  16. command: redis-sentinel /usr/local/etc/redis/sentinel.conf
  17. volumes:
  18. - ./sentinel2.conf:/usr/local/etc/redis/sentinel.conf
  19. sentinel3:
  20. image: redis:5.0.11
  21. container_name: redis-sentinel-3
  22. ports:
  23. - 0.0.0.0:26381:26381
  24. command: redis-sentinel /usr/local/etc/redis/sentinel.conf
  25. volumes:
  26. - ./sentinel3.conf:/usr/local/etc/redis/sentinel.conf
  27. sentinel4:
  28. image: redis:5.0.11
  29. container_name: redis-sentinel-4
  30. ports:
  31. - 0.0.0.0:26382:26381
  32. command: redis-sentinel /usr/local/etc/redis/sentinel.conf
  33. volumes:
  34. - ./sentinel4.conf:/usr/local/etc/redis/sentinel.conf
  35. sentinel5:
  36. image: redis:5.0.11
  37. container_name: redis-sentinel-5
  38. ports:
  39. - 0.0.0.0:26383:26381
  40. command: redis-sentinel /usr/local/etc/redis/sentinel.conf
  41. volumes:
  42. - ./sentinel5.conf:/usr/local/etc/redis/sentinel.conf
  43. networks:
  44. default:
  45. external:
  46. name: redis_default