单服务器集群
3主3从的redis cluster
配置docker-compose.yml
version: "3.3"
services:
local:
# build:
# context: .
# image: redis-cluster
image: grokzen/redis-cluster:6.0.1
environment:
IP: 0.0.0.0
INITIAL_PORT: 7000
MASTERS: 3
SLAVES_PER_MASTER: 1
ports:
- 7000-7005:7000-7005
networks:
- internal
networks:
internal:
# 启动
$ docker-compose up --build -d
# 日志
# $ docker-compose logs -f
# 关闭
# $ docker-compose down
# 本地连接测试
# $ redis-cli -c -h 0.0.0.0 -p 7000
# $ > cluster info
# $ > cluster slots
单服务器集群
3主3从的redis cluster
配置
docker-compose.yml