1 Star 0 Fork 2

ufo520/redis-sentinel-docker-compose

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
docker-compose.yaml 1.66 KB
一键复制 编辑 原始数据 按行查看 历史
Your Name 提交于 2020-11-24 17:08 . 提交
version: "3.1"
services:
#redis主
redis-master:
image: redis:5.0.9
restart: always
network_mode: host
container_name: redis-master
environment:
- TZ=Asia/Shanghai
# ports:
# - 6377:6379
command: /usr/local/bin/redis-server /usr/local/etc/redis/redis.conf
volumes:
- ./master/conf/redis.conf:/usr/local/etc/redis/redis.conf
- ./master/data:/data
- ./master/logs:/var/log/redis
#redis从1
redis-slave1:
image: redis:5.0.9
restart: always
network_mode: host
container_name: redis-slave1
environment:
- TZ=Asia/Shanghai
# ports:
# - 6377:6379
command: /usr/local/bin/redis-server /usr/local/etc/redis/redis.conf
volumes:
- ./slave1/conf/redis.conf:/usr/local/etc/redis/redis.conf
- ./slave1/data:/data
- ./slave1/logs:/var/log/redis
#redis从2
redis-slave2:
image: redis:5.0.9
restart: always
network_mode: host
container_name: redis-slave2
environment:
- TZ=Asia/Shanghai
# ports:
# - 6377:6379
command: /usr/local/bin/redis-server /usr/local/etc/redis/redis.conf
volumes:
- ./slave2/conf/redis.conf:/usr/local/etc/redis/redis.conf
- ./slave2/data:/data
- ./slave2/logs:/var/log/redis
#哨兵之后在加从
redis-slave3:
image: redis:5.0.9
restart: always
network_mode: host
container_name: redis-slave3
environment:
- TZ=Asia/Shanghai
# ports:
# - 6377:6379
command: /usr/local/bin/redis-server /usr/local/etc/redis/redis.conf
volumes:
- ./slave3/conf/redis.conf:/usr/local/etc/redis/redis.conf
- ./slave3/data:/data
- ./slave3/logs:/var/log/redis
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ufo520/redis-sentinel-docker-compose.git
git@gitee.com:ufo520/redis-sentinel-docker-compose.git
ufo520
redis-sentinel-docker-compose
redis-sentinel-docker-compose
main

搜索帮助

0d507c66 1850385 C8b1a773 1850385