1 Star 1 Fork 2

tianheng2017/redis-sentinel

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
docker-compose.yml 1.86 KB
一键复制 编辑 原始数据 按行查看 历史
tianheng2017 提交于 2020-02-28 13:37 +08:00 . Update docker-compose.yml
version: '3.4'
services:
master:
image: redis
container_name: redis-master
restart: always
command: redis-server --bind 0.0.0.0 --protected-mode no --port 7000 --daemonize no --requirepass mypassword --masterauth mypassword --appendonly yes --logfile "redis.log" --dir ./
ports:
- 7000:7000
volumes:
- ./data7000:/data
slave1:
image: redis
container_name: redis-slave1
restart: always
command: redis-server --bind 0.0.0.0 --protected-mode no --slaveof x.x.x.x 7000 --port 7001 --daemonize no --requirepass mypassword --masterauth mypassword --appendonly yes --logfile "redis.log" --dir ./
ports:
- 7001:7001
volumes:
- ./data7001:/data
slave2:
image: redis
container_name: redis-slave2
restart: always
command: redis-server --bind 0.0.0.0 --protected-mode no --slaveof x.x.x.x 7000 --port 7002 --daemonize no --requirepass mypassword --masterauth mypassword --appendonly yes --logfile "redis.log" --dir ./
ports:
- 7002:7002
volumes:
- ./data7002:/data
sentinel1:
image: redis
container_name: sentinel1
restart: always
command: redis-sentinel /etc/redis/sentinel.conf
ports:
- 26379:26379
volumes:
- ./sentinel26379:/data
- ./sentinel26379.conf:/etc/redis/sentinel.conf
sentinel2:
image: redis
container_name: sentinel2
restart: always
command: redis-sentinel /etc/redis/sentinel.conf
ports:
- 26380:26380
volumes:
- ./sentinel26380:/data
- ./sentinel26380.conf:/etc/redis/sentinel.conf
sentinel3:
image: redis
container_name: sentinel3
restart: always
command: redis-sentinel /etc/redis/sentinel.conf
ports:
- 26381:26381
volumes:
- ./sentinel26381:/data
- ./sentinel26381.conf:/etc/redis/sentinel.conf
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/tianheng2017/redis-sentinel.git
git@gitee.com:tianheng2017/redis-sentinel.git
tianheng2017
redis-sentinel
redis-sentinel
master

搜索帮助