docker-swarm-review
This commit is contained in:
100
docker-swarm-review/redis-review-132/docker-compose-sentinel.yml
Normal file
100
docker-swarm-review/redis-review-132/docker-compose-sentinel.yml
Normal file
@@ -0,0 +1,100 @@
|
||||
version: '3.8'
|
||||
|
||||
# Review Sentinel 配置
|
||||
# 仅在故障切换后部署,用于 Review 环境的高可用
|
||||
# 部署前确保 132 已提升为 Master (SLAVEOF NO ONE)
|
||||
|
||||
networks:
|
||||
default:
|
||||
name: ${NAMESPACE}
|
||||
external: true
|
||||
|
||||
services:
|
||||
sentinel-1:
|
||||
image: 'bitnami/redis-sentinel:7.0.11'
|
||||
hostname: ${NAMESPACE}-sentinel-1
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
- REDIS_MASTER_HOST=192.168.3.132
|
||||
- REDIS_MASTER_PORT_NUMBER=6379
|
||||
- REDIS_MASTER_PASSWORD=${REDIS_PASSWORD}
|
||||
- REDIS_SENTINEL_PASSWORD=${REDIS_SENTINEL_PASSWORD}
|
||||
- REDIS_SENTINEL_ANNOUNCE_IP=192.168.3.132
|
||||
- REDIS_MASTER_SET=reviewmaster
|
||||
- REDIS_SENTINEL_QUORUM=2
|
||||
- REDIS_SENTINEL_DOWN_AFTER_MILLISECONDS=5000
|
||||
ports:
|
||||
- mode: host
|
||||
protocol: tcp
|
||||
published: 26379
|
||||
target: 26379
|
||||
volumes:
|
||||
- sentinel_data_1:/bitnami
|
||||
deploy:
|
||||
update_config:
|
||||
order: stop-first
|
||||
placement:
|
||||
constraints:
|
||||
- node.hostname==ZD-BAK-APP2
|
||||
|
||||
sentinel-2:
|
||||
image: 'bitnami/redis-sentinel:7.0.11'
|
||||
hostname: ${NAMESPACE}-sentinel-2
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
- REDIS_MASTER_HOST=192.168.3.132
|
||||
- REDIS_MASTER_PORT_NUMBER=6379
|
||||
- REDIS_MASTER_PASSWORD=${REDIS_PASSWORD}
|
||||
- REDIS_SENTINEL_PASSWORD=${REDIS_SENTINEL_PASSWORD}
|
||||
- REDIS_SENTINEL_ANNOUNCE_IP=192.168.3.133
|
||||
- REDIS_MASTER_SET=reviewmaster
|
||||
- REDIS_SENTINEL_QUORUM=2
|
||||
- REDIS_SENTINEL_DOWN_AFTER_MILLISECONDS=5000
|
||||
ports:
|
||||
- mode: host
|
||||
protocol: tcp
|
||||
published: 26379
|
||||
target: 26379
|
||||
volumes:
|
||||
- sentinel_data_2:/bitnami
|
||||
deploy:
|
||||
update_config:
|
||||
order: stop-first
|
||||
placement:
|
||||
constraints:
|
||||
- node.hostname==zd-bak-app3
|
||||
|
||||
sentinel-3:
|
||||
image: 'bitnami/redis-sentinel:7.0.11'
|
||||
hostname: ${NAMESPACE}-sentinel-3
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
- REDIS_MASTER_HOST=192.168.3.132
|
||||
- REDIS_MASTER_PORT_NUMBER=6379
|
||||
- REDIS_MASTER_PASSWORD=${REDIS_PASSWORD}
|
||||
- REDIS_SENTINEL_PASSWORD=${REDIS_SENTINEL_PASSWORD}
|
||||
- REDIS_SENTINEL_ANNOUNCE_IP=192.168.3.134
|
||||
- REDIS_MASTER_SET=reviewmaster
|
||||
- REDIS_SENTINEL_QUORUM=2
|
||||
- REDIS_SENTINEL_DOWN_AFTER_MILLISECONDS=5000
|
||||
ports:
|
||||
- mode: host
|
||||
protocol: tcp
|
||||
published: 26379
|
||||
target: 26379
|
||||
volumes:
|
||||
- sentinel_data_3:/bitnami
|
||||
deploy:
|
||||
update_config:
|
||||
order: stop-first
|
||||
placement:
|
||||
constraints:
|
||||
- node.hostname==ZD-BAK-APP1
|
||||
|
||||
volumes:
|
||||
sentinel_data_1:
|
||||
driver: local
|
||||
sentinel_data_2:
|
||||
driver: local
|
||||
sentinel_data_3:
|
||||
driver: local
|
||||
Reference in New Issue
Block a user