1 Star 0 Fork 1

大数据老司机/docker-compose-redis

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
docker-compose.yaml 1.17 KB
一键复制 编辑 原始数据 按行查看 历史
大数据老司机 提交于 2023-05-31 22:11 . init
version: '3'
services:
redis-master:
image: registry.cn-hangzhou.aliyuncs.com/bigdata_cloudnative/redis:7.0.3
container_name: redis-master
hostname: redis-master
restart: always
volumes:
- ./config/master/redis.conf:/usr/local/redis/redis.conf
ports:
- "36379:6379"
#command: ["sh","-c","/opt/apache/bootstrap.sh master"]
command: ["sh","-c","/usr/local/bin/redis-server /usr/local/redis/redis.conf ; tail -f /usr/local/redis/redis.log"]
networks:
- hadoop-network
healthcheck:
test: ["CMD-SHELL", "netstat -tnlp|grep 6379 || exit 1"]
interval: 10s
timeout: 20s
retries: 3
redis-slave:
image: registry.cn-hangzhou.aliyuncs.com/bigdata_cloudnative/redis:7.0.3
restart: always
deploy:
replicas: 2
volumes:
- ./config/slave/redis.conf:/usr/local/redis/redis.conf
ports:
- "6379"
command: ["sh","-c","/opt/apache/bootstrap.sh slave"]
networks:
- hadoop-network
healthcheck:
test: ["CMD-SHELL", "netstat -tnlp|grep 6379 || exit 1"]
interval: 10s
timeout: 10s
retries: 3
# 连接外部网络
networks:
hadoop-network:
external: true
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hadoop-bigdata/docker-compose-redis.git
git@gitee.com:hadoop-bigdata/docker-compose-redis.git
hadoop-bigdata
docker-compose-redis
docker-compose-redis
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385