Redis6 cluster
单机版本
# tree . . ├── co ├── conf │ └── redis-6379.conf ├── data ├── docker-compose.yml ├── docker-compose.ymlbak └── log cat docker-compose.yml version: "3" services: redis-cluster-6379: image: ccr.ccs.tencentyun.com/evan/devops:redis-alpine-v6.2.5 container_name: node-6379 ports: - "6379:6379" restart: always #network_mode: host #network_mode: host environment: # 设置环境变量 时区上海 编码UTF-8 TZ: Asia/Shanghai LANG: en_US.UTF-8 volumes: - ./conf/redis-6379.conf:/usr/local/etc/redis/redis.conf - ./log:/var/log/redis - ./data:/data/redis command: sh -c "redis-server /usr/local/etc/redis/redis.conf" # cat conf/redis-6379.conf port 6379 bind 0.0.0.0 #bind 192.168.10.120 127.0.0.1 #cluster-enabled yes appendfilename "appendonly-6379.aof" #cluster-node-timeout 15000 appendonly yes appendfsync everysec #daemonize yes dbfilename dump_6379.rdb requirepass "evandfsaffmhw3xd34" conf data log 目录要自己创建
See also
References
docker-compose 安装 redis 6.X 配置远程连接,持久化RDB AOF