mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-02-23 14:32:27 +08:00
1.MongoDB、Redis兼容集群模式
2.离线数据接口化访问
This commit is contained in:
12
docker/3rd/redis/redis_cluster/conf/redis1/redis.conf
Normal file
12
docker/3rd/redis/redis_cluster/conf/redis1/redis.conf
Normal file
@@ -0,0 +1,12 @@
|
||||
port 6371
|
||||
requirepass 123456
|
||||
masterauth 123456
|
||||
protected-mode no
|
||||
daemonize no
|
||||
appendonly yes
|
||||
cluster-enabled yes
|
||||
cluster-config-file nodes.conf
|
||||
cluster-node-timeout 15000
|
||||
cluster-announce-ip 192.168.199.233
|
||||
cluster-announce-port 6371
|
||||
cluster-announce-bus-port 16371
|
||||
12
docker/3rd/redis/redis_cluster/conf/redis2/redis.conf
Normal file
12
docker/3rd/redis/redis_cluster/conf/redis2/redis.conf
Normal file
@@ -0,0 +1,12 @@
|
||||
port 6372
|
||||
requirepass 123456
|
||||
masterauth 123456
|
||||
protected-mode no
|
||||
daemonize no
|
||||
appendonly yes
|
||||
cluster-enabled yes
|
||||
cluster-config-file nodes.conf
|
||||
cluster-node-timeout 15000
|
||||
cluster-announce-ip 192.168.199.233
|
||||
cluster-announce-port 6372
|
||||
cluster-announce-bus-port 16372
|
||||
12
docker/3rd/redis/redis_cluster/conf/redis3/redis.conf
Normal file
12
docker/3rd/redis/redis_cluster/conf/redis3/redis.conf
Normal file
@@ -0,0 +1,12 @@
|
||||
port 6373
|
||||
requirepass 123456
|
||||
masterauth 123456
|
||||
protected-mode no
|
||||
daemonize no
|
||||
appendonly yes
|
||||
cluster-enabled yes
|
||||
cluster-config-file nodes.conf
|
||||
cluster-node-timeout 15000
|
||||
cluster-announce-ip 192.168.199.233
|
||||
cluster-announce-port 6373
|
||||
cluster-announce-bus-port 16373
|
||||
12
docker/3rd/redis/redis_cluster/conf/redis4/redis.conf
Normal file
12
docker/3rd/redis/redis_cluster/conf/redis4/redis.conf
Normal file
@@ -0,0 +1,12 @@
|
||||
port 6374
|
||||
requirepass 123456
|
||||
masterauth 123456
|
||||
protected-mode no
|
||||
daemonize no
|
||||
appendonly yes
|
||||
cluster-enabled yes
|
||||
cluster-config-file nodes.conf
|
||||
cluster-node-timeout 15000
|
||||
cluster-announce-ip 192.168.199.233
|
||||
cluster-announce-port 6374
|
||||
cluster-announce-bus-port 16374
|
||||
12
docker/3rd/redis/redis_cluster/conf/redis5/redis.conf
Normal file
12
docker/3rd/redis/redis_cluster/conf/redis5/redis.conf
Normal file
@@ -0,0 +1,12 @@
|
||||
port 6375
|
||||
requirepass 123456
|
||||
masterauth 123456
|
||||
protected-mode no
|
||||
daemonize no
|
||||
appendonly yes
|
||||
cluster-enabled yes
|
||||
cluster-config-file nodes.conf
|
||||
cluster-node-timeout 15000
|
||||
cluster-announce-ip 192.168.199.233
|
||||
cluster-announce-port 6375
|
||||
cluster-announce-bus-port 16375
|
||||
12
docker/3rd/redis/redis_cluster/conf/redis6/redis.conf
Normal file
12
docker/3rd/redis/redis_cluster/conf/redis6/redis.conf
Normal file
@@ -0,0 +1,12 @@
|
||||
port 6376
|
||||
requirepass 123456
|
||||
masterauth 123456
|
||||
protected-mode no
|
||||
daemonize no
|
||||
appendonly yes
|
||||
cluster-enabled yes
|
||||
cluster-config-file nodes.conf
|
||||
cluster-node-timeout 15000
|
||||
cluster-announce-ip 192.168.199.233
|
||||
cluster-announce-port 6376
|
||||
cluster-announce-bus-port 16376
|
||||
10
docker/3rd/redis/redis_cluster/create_cluster.sh
Executable file
10
docker/3rd/redis/redis_cluster/create_cluster.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
redis-cli -a 123456 --cluster create \
|
||||
192.168.199.233:6371 \
|
||||
192.168.199.233:6372 \
|
||||
192.168.199.233:6373 \
|
||||
192.168.199.233:6374 \
|
||||
192.168.199.233:6375 \
|
||||
192.168.199.233:6376 \
|
||||
--cluster-replicas 1
|
||||
127
docker/3rd/redis/redis_cluster/docker-compose.yaml
Normal file
127
docker/3rd/redis/redis_cluster/docker-compose.yaml
Normal file
@@ -0,0 +1,127 @@
|
||||
version: '3'
|
||||
services:
|
||||
redis1:
|
||||
restart: always
|
||||
image: redis:4
|
||||
container_name: redis1
|
||||
ports:
|
||||
- "6371:6371/tcp"
|
||||
- "16371:16371/tcp"
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime
|
||||
- /etc/timezone:/etc/timezone
|
||||
- ./conf/redis1/redis.conf:/redis/redis.conf
|
||||
- ./data/redis1:/data
|
||||
command: redis-server /redis/redis.conf
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.00'
|
||||
memory: 512M
|
||||
|
||||
redis2:
|
||||
restart: always
|
||||
image: redis:4
|
||||
container_name: redis2
|
||||
ports:
|
||||
- "6372:6372/tcp"
|
||||
- "16372:16372/tcp"
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime
|
||||
- /etc/timezone:/etc/timezone
|
||||
- ./conf/redis2/redis.conf:/redis/redis.conf
|
||||
- ./data/redis2:/data
|
||||
command: redis-server /redis/redis.conf
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.00'
|
||||
memory: 512M
|
||||
|
||||
redis3:
|
||||
restart: always
|
||||
image: redis:4
|
||||
container_name: redis3
|
||||
ports:
|
||||
- "6373:6373/tcp"
|
||||
- "16373:16373/tcp"
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime
|
||||
- /etc/timezone:/etc/timezone
|
||||
- ./conf/redis3/redis.conf:/redis/redis.conf
|
||||
- ./data/redis3:/data
|
||||
command: redis-server /redis/redis.conf
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.00'
|
||||
memory: 512M
|
||||
|
||||
redis4:
|
||||
restart: always
|
||||
image: redis:4
|
||||
container_name: redis4
|
||||
ports:
|
||||
- "6374:6374/tcp"
|
||||
- "16374:16374/tcp"
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime
|
||||
- /etc/timezone:/etc/timezone
|
||||
- ./conf/redis4/redis.conf:/redis/redis.conf
|
||||
- ./data/redis4:/data
|
||||
command: redis-server /redis/redis.conf
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.00'
|
||||
memory: 512M
|
||||
|
||||
redis5:
|
||||
restart: always
|
||||
image: redis:4
|
||||
container_name: redis5
|
||||
ports:
|
||||
- "6375:6375/tcp"
|
||||
- "16375:16375/tcp"
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime
|
||||
- /etc/timezone:/etc/timezone
|
||||
- ./conf/redis5/redis.conf:/redis/redis.conf
|
||||
- ./data/redis5:/data
|
||||
command: redis-server /redis/redis.conf
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.00'
|
||||
memory: 512M
|
||||
|
||||
redis6:
|
||||
restart: always
|
||||
image: redis:4
|
||||
container_name: redis6
|
||||
ports:
|
||||
- "6376:6376/tcp"
|
||||
- "16376:16376/tcp"
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime
|
||||
- /etc/timezone:/etc/timezone
|
||||
- ./conf/redis6/redis.conf:/redis/redis.conf
|
||||
- ./data/redis6:/data
|
||||
command: redis-server /redis/redis.conf
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.00'
|
||||
memory: 512M
|
||||
Reference in New Issue
Block a user