Docker 设置redis 集群

时间:2024-04-03 18:10:53
version: '3' services: redis1: image: redis:latest command: ["redis-server", "--port", "7000"] ports: - "7000:7000" networks: - redisnet redis2: image: redis:latest command: ["redis-server", "--port", "7001"] ports: - "7001:7001" networks: - redisnet redis3: image: redis:latest command: ["redis-server", "--port", "7002"] ports: - "7002:7002" networks: - redisnet networks: redisnet: