version: '2' services: redis_master: image: redis:4.0.2-alpine ports: - "6579:6379" redis_slave: image: redis:4.0.2-alpine ports: - "6479:6379" sentinel1: build: . image: redis-sentinel environment: - MASTER_NAME=mymaster - QUORUM=2 - MASTER=localhost:6579 - SLAVES=localhost:6479 ports: - "26379:26379" sentinel2: build: . image: redis-sentinel environment: - MASTER_NAME=mymaster - QUORUM=2 - MASTER=localhost:6579 - SLAVES=localhost:6479 ports: - "26479:26379" sentinel3: build: . image: redis-sentinel environment: - MASTER_NAME=mymaster - QUORUM=2 - MASTER=localhost:6579 - SLAVES=localhost:6479 ports: - "26579:26379"