docker-compose.yml 807 B

123456789101112131415161718192021222324252627282930
  1. version: '3'
  2. services:
  3. sentinel1:
  4. image: redis:5.0.11
  5. container_name: redis-sentinel-1
  6. ports:
  7. - 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. - 26380:26379
  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. - 26381:26379
  24. command: redis-sentinel /usr/local/etc/redis/sentinel.conf
  25. volumes:
  26. - ./sentinel3.conf:/usr/local/etc/redis/sentinel.conf
  27. networks:
  28. default:
  29. external:
  30. name: redis_default