Docker 部署 redis集群
2020-10-22 本文已影响0人
Sunnky
version: '3.7'
services:
redis6379:
image: 'redis'
container_name: redis6379
command:
["redis-server", "/usr/local/etc/redis/redis.conf"]
volumes:
- ./redis-cluster/6379/conf/redis.conf:/usr/local/etc/redis/redis.conf
- ./redis-cluster/6379/data:/data
ports:
- "6379:6379"
- "17001:17001"
environment:
- TZ=Asia/Shanghai
redis6378:
image: 'redis'
container_name: redis6378
command:
["redis-server", "/usr/local/etc/redis/redis.conf"]
volumes:
- ./redis-cluster/6378/conf/redis.conf:/usr/local/etc/redis/redis.conf
- ./redis-cluster/6378/data:/data
ports:
- "6378:6378"
- "17002:17002"
environment:
- TZ=Asia/Shanghai
redis6377:
image: 'redis'
container_name: redis6377
command:
["redis-server", "/usr/local/etc/redis/redis.conf"]
volumes:
- ./redis-cluster/6377/conf/redis.conf:/usr/local/etc/redis/redis.conf
- ./redis-cluster/6377/data:/data
ports:
- "6377:6377"
- "17003:17003"
environment:
- TZ=Asia/Shanghai