A quick instruction to setup the redis cluster on local machine for quick testing. I am going to use bitnami docker images.
- Start the redis cluster with one master and one slave
docker-compose up -d
- Tear down the redis cluster
docker-compose down
A quick instruction to setup the redis cluster on local machine for quick testing. I am going to use bitnami docker images.
docker-compose up -d
docker-compose down
version: '3' | |
services: | |
redis-master: | |
image: 'bitnami/redis:5.0.14' | |
ports: | |
- '6379' | |
environment: | |
- REDIS_REPLICATION_MODE=master | |
- ALLOW_EMPTY_PASSWORD=yes | |
redis-replica: | |
image: 'bitnami/redis:5.0.14' | |
ports: | |
- '6379' | |
depends_on: | |
- redis-master | |
environment: | |
- REDIS_REPLICATION_MODE=slave | |
- REDIS_MASTER_HOST=redis-master | |
- REDIS_MASTER_PORT_NUMBER=6379 | |
- ALLOW_EMPTY_PASSWORD=yes |