The file tree must be as follows:
.
├── data
│ ├── sentinel1
│ │ └── sentinel1.conf
│ ├── sentinel2
│ │ └── sentinel2.conf
│ └── sentinel3
│ └── sentinel3.conf
└── podman-compose.yml
CONFIG_QUEUES_MASTER_NAME=redis://mymaster | |
CONFIG_QUEUES_SENTINEL_HOSTS=redis://localhost:9000,redis://localhost:9001,redis://localhost:9002 | |
CONFIG_REDIS_PROXY=redis://mymaster | |
CONFIG_REDIS_SENTINEL_HOSTS=redis://localhost:9000,redis://localhost:9001,redis://localhost:9002 |
version: '3' | |
services: | |
redis-master: | |
container_name: "redis-master" | |
image: redis | |
ports: | |
- "6379:6379" | |
redis-sentinel1: | |
container_name: "redis-sentinel1" | |
image: redis | |
ports: | |
- "9000:9000" | |
command: "/data/sentinel1.conf --port 9000 --sentinel" | |
volumes: | |
- "./data/sentinel1:/data:Z" | |
redis-sentinel2: | |
container_name: "redis-sentinel2" | |
image: redis | |
ports: | |
- "9001:9001" | |
command: "/data/sentinel2.conf --port 9001 --sentinel" | |
volumes: | |
- "./data/sentinel2:/data:Z" | |
redis-sentinel3: | |
container_name: "redis-sentinel3" | |
image: redis | |
ports: | |
- "9002:9002" | |
command: "/data/sentinel3.conf --port 9002 --sentinel" | |
volumes: | |
- "./data/sentinel3:/data:Z" |
The file tree must be as follows:
.
├── data
│ ├── sentinel1
│ │ └── sentinel1.conf
│ ├── sentinel2
│ │ └── sentinel2.conf
│ └── sentinel3
│ └── sentinel3.conf
└── podman-compose.yml
port 9000 | |
sentinel monitor mymaster 127.0.0.1 6379 2 | |
sentinel down-after-milliseconds mymaster 5000 | |
sentinel failover-timeout mymaster 60000 |
port 9001 | |
sentinel monitor mymaster 127.0.0.1 6379 2 | |
sentinel down-after-milliseconds mymaster 5000 | |
sentinel failover-timeout mymaster 60000 |
port 9002 | |
sentinel monitor mymaster 127.0.0.1 6379 2 | |
sentinel down-after-milliseconds mymaster 5000 | |
sentinel failover-timeout mymaster 60000 |