[redis] create redis for Task#12048
This commit is contained in:
parent
07c73d8dfc
commit
539772c1e5
3 changed files with 32 additions and 0 deletions
22
redis/docker-compose.yaml
Normal file
22
redis/docker-compose.yaml
Normal file
|
@ -0,0 +1,22 @@
|
|||
version: '3'
|
||||
services:
|
||||
redis-master:
|
||||
container_name: "redis-master"
|
||||
image: redis:7.2-alpine
|
||||
network_mode: "host"
|
||||
command: redis-server /etc/redis.conf
|
||||
volumes:
|
||||
- ./redis-master.conf:/etc/redis.conf
|
||||
- ./masterdata:/data
|
||||
restart: always
|
||||
redis-slave:
|
||||
container_name: "redis-slave"
|
||||
image: redis:7.2-alpine
|
||||
network_mode: "host"
|
||||
command: redis-server /etc/redis.conf
|
||||
volumes:
|
||||
- ./redis-slave.conf:/etc/redis.conf
|
||||
- ./slavedata:/data
|
||||
restart: always
|
||||
depends_on:
|
||||
- redis-master
|
5
redis/redis-master.conf
Normal file
5
redis/redis-master.conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
cluster-enabled yes
|
||||
cluster-node-timeout 5000
|
||||
cluster-require-full-coverage yes
|
||||
appendonly yes
|
||||
port 7001
|
5
redis/redis-slave.conf
Normal file
5
redis/redis-slave.conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
cluster-enabled yes
|
||||
cluster-node-timeout 5000
|
||||
cluster-require-full-coverage yes
|
||||
appendonly yes
|
||||
port 7101
|
Loading…
Reference in a new issue