Quellcode durchsuchen

update ha/redis

reghao vor 3 Wochen
Ursprung
Commit
3a2218a80b
3 geänderte Dateien mit 6 neuen und 12 gelöschten Zeilen
  1. 2 4
      ha/redis/docker-compose1.yml
  2. 2 4
      ha/redis/docker-compose2.yml
  3. 2 4
      ha/redis/docker-compose3.yml

+ 2 - 4
ha/redis/docker-compose1.yml

@@ -3,8 +3,7 @@ services:
     image: registry.cn-chengdu.aliyuncs.com/reghao/redis:6.0.16-bullseye
     container_name: redis-master
     restart: always
-    ports:
-      - "6379:6379"
+    network_mode: host
     # 开启 AOF 持久化(生产环境建议开启)
     command: redis-server /etc/redis/redis.conf --appendonly yes
     volumes:
@@ -37,8 +36,7 @@ services:
     image: registry.cn-chengdu.aliyuncs.com/reghao/redis:6.0.16-bullseye
     container_name: sentinel-1
     restart: always
-    ports:
-      - "26379:26379"
+    network_mode: host
     command: redis-sentinel /etc/redis/sentinel.conf
     volumes:
       - /etc/localtime:/etc/localtime:ro

+ 2 - 4
ha/redis/docker-compose2.yml

@@ -3,8 +3,7 @@ services:
     image: registry.cn-chengdu.aliyuncs.com/reghao/redis:6.0.16-bullseye
     container_name: redis-slave-1
     restart: always
-    ports:
-      - "6379:6379"
+    network_mode: host
     volumes:
       - /etc/localtime:/etc/localtime:ro
       - /opt/docker/redis/redis.conf:/etc/redis/redis.conf
@@ -37,8 +36,7 @@ services:
     image: registry.cn-chengdu.aliyuncs.com/reghao/redis:6.0.16-bullseye
     container_name: sentinel-2
     restart: always
-    ports:
-      - "26379:26379"
+    network_mode: host
     command: redis-sentinel /etc/redis/sentinel.conf
     volumes:
       - /etc/localtime:/etc/localtime:ro

+ 2 - 4
ha/redis/docker-compose3.yml

@@ -3,8 +3,7 @@ services:
     image: registry.cn-chengdu.aliyuncs.com/reghao/redis:6.0.16-bullseye
     container_name: redis-slave-2
     restart: always
-    ports:
-      - "6379:6379"
+    network_mode: host
     volumes:
       - /etc/localtime:/etc/localtime:ro
       - /opt/docker/redis/redis.conf:/etc/redis/redis.conf
@@ -36,8 +35,7 @@ services:
     image: registry.cn-chengdu.aliyuncs.com/reghao/redis:6.0.16-bullseye
     container_name: sentinel-3
     restart: always
-    ports:
-      - "26379:26379"
+    network_mode: host
     command: redis-sentinel /etc/redis/sentinel.conf
     volumes:
       - /etc/localtime:/etc/localtime:ro