Create Redis Cluster by Docker Compose

Create a docker-compose.yml version: "3.9" services: redis-1: image: redis:7.0.2-alpine container_name: redis-1 ports: - "6371:6371" - "16371:16371" volumes: - ./node-1/data:/data - ./node-1/conf/redis.conf:/etc/redis/redis.conf networks: redis: ipv4_address: 172.28.0.11 command: - "redis-server" - "/etc/redis/redis.conf" redis-2: image: redis:7.0.2-alpine container_name: redis-2 ports: - "6372:6372" - "16372:16372" volumes: - ./node-2/data:/data - ./node-2/conf/redis.conf:/etc/redis/redis.conf networks: redis: ipv4_address: 172.28.0.12 command: - "redis-server" - "/etc/redis/redis.conf" redis-3: image: redis:7.0.2-alpine container_name: redis-3 ports: - "6373:6373" - "16373:16373" volumes: - ./node-3/data:/data - ./node-3/conf/redis.conf:/etc/redis/redis.conf networks: redis: ipv4_address: 172....

2022年6月21日