代码拉取完成,页面将自动刷新
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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。