This commit is contained in:
2022-04-18 11:21:20 +08:00
commit 45a7af638f
210 changed files with 8997 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
# 部署 redis 三主集群
- 按实际环境修改
- docker-compose.yml
- 创建目录
```
grep '\<source:' docker-compose.yml cut -d: -f2 | xargs mkdir -p
```
- 启动
```
docker-compose up -d
```

View File

@@ -0,0 +1,70 @@
version: "3.7"
services:
redis-6371:
image: harbor.colben.cn/general/redis
container_name: redis-6371
restart: on-failure
stop_grace_period: 1m
privileged: true
network_mode: host
environment:
_CONF_cluster-enabled: "yes"
_CONF_port: 6371
_CONF_bind: 127.0.0.1
_CONF_maxmemory: 256MB
_CONF_masterauth: Pass_1234
_CONF_requirepass: Pass_1234
MASTER_NODES: "127.0.0.1:6371 127.0.0.1:6372 127.0.0.1:6373"
volumes:
- type: bind
source: ./redis-6371/db
target: /var/lib/redis
- type: bind
source: ./redis-6371/log
target: /var/log/redis
redis-6372:
image: harbor.colben.cn/general/redis
container_name: redis-6372
restart: on-failure
stop_grace_period: 1m
privileged: true
network_mode: host
environment:
_CONF_cluster-enabled: "yes"
_CONF_port: 6372
_CONF_bind: 127.0.0.1
_CONF_maxmemory: 256MB
_CONF_masterauth: Pass_1234
_CONF_requirepass: Pass_1234
volumes:
- type: bind
source: ./redis-6372/db
target: /var/lib/redis
- type: bind
source: ./redis-6372/log
target: /var/log/redis
redis-6373:
image: harbor.colben.cn/general/redis
container_name: redis-6373
restart: on-failure
stop_grace_period: 1m
privileged: true
network_mode: host
environment:
_CONF_cluster-enabled: "yes"
_CONF_port: 6373
_CONF_bind: 127.0.0.1
_CONF_maxmemory: 256MB
_CONF_masterauth: Pass_1234
_CONF_requirepass: Pass_1234
volumes:
- type: bind
source: ./redis-6373/db
target: /var/lib/redis
- type: bind
source: ./redis-6373/log
target: /var/log/redis