docker/redis/README.md
2022-04-18 11:21:20 +08:00

23 lines
698 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 构建 redis 镜像
## 定制
- 安装 redis
- 固定一些常用配置
- __主节点数量最少三个从节点要么没有要么与主节点数量一致否则出错__
- docker 参数: --privileged
## 外挂目录和文件
- /var/lib/redis: redis 数据目录
- /var/log/redis: redis 日志目录
## 引入环境变量
- MASTER_NODES: 主节点列表__用空格间隔__
- SLAVE_NODES: 从节点列表__用空格间隔__
- \_CONF\_\*: redis 配置
## 案例
- [Demo/SingleNode/](Demo/SingleNode/): 部署单点
- [Demo/ThreeNodes/](Demo/ThreeNodes/): 部署集群,只有三个主节点
- [Demo/SixNodes/](Demo/SixNodes/): 部署集群,有三个主节点和三个从节点