Skip to content

Instantly share code, notes, and snippets.

@Djacke
Created March 28, 2018 06:42
Show Gist options
  • Save Djacke/0a26054c3eda084dc0ddecd602055af0 to your computer and use it in GitHub Desktop.
Save Djacke/0a26054c3eda084dc0ddecd602055af0 to your computer and use it in GitHub Desktop.
redis sentinel docker compose yml
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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment