From 539772c1e54965e9a0833c2f8d54a29b5c434f1e Mon Sep 17 00:00:00 2001 From: root Date: Mon, 25 Sep 2023 11:43:37 +0000 Subject: [PATCH] [redis] create redis for Task#12048 --- redis/docker-compose.yaml | 22 ++++++++++++++++++++++ redis/redis-master.conf | 5 +++++ redis/redis-slave.conf | 5 +++++ 3 files changed, 32 insertions(+) create mode 100644 redis/docker-compose.yaml create mode 100644 redis/redis-master.conf create mode 100644 redis/redis-slave.conf diff --git a/redis/docker-compose.yaml b/redis/docker-compose.yaml new file mode 100644 index 0000000..4419cfb --- /dev/null +++ b/redis/docker-compose.yaml @@ -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 diff --git a/redis/redis-master.conf b/redis/redis-master.conf new file mode 100644 index 0000000..3f758f6 --- /dev/null +++ b/redis/redis-master.conf @@ -0,0 +1,5 @@ +cluster-enabled yes +cluster-node-timeout 5000 +cluster-require-full-coverage yes +appendonly yes +port 7001 diff --git a/redis/redis-slave.conf b/redis/redis-slave.conf new file mode 100644 index 0000000..bf535f8 --- /dev/null +++ b/redis/redis-slave.conf @@ -0,0 +1,5 @@ +cluster-enabled yes +cluster-node-timeout 5000 +cluster-require-full-coverage yes +appendonly yes +port 7101