美文网首页
Docker 部署 redis集群

Docker 部署 redis集群

作者: Sunnky | 来源:发表于2020-10-22 19:33 被阅读0次
    version: '3.7'
    
    services:
      redis6379:
        image: 'redis'
        container_name: redis6379
        command:
          ["redis-server", "/usr/local/etc/redis/redis.conf"]
        volumes:
          - ./redis-cluster/6379/conf/redis.conf:/usr/local/etc/redis/redis.conf
          - ./redis-cluster/6379/data:/data
        ports:
          - "6379:6379"
          - "17001:17001"
        environment:
          - TZ=Asia/Shanghai
    
    
      redis6378:
        image: 'redis'
        container_name: redis6378
        command:
          ["redis-server", "/usr/local/etc/redis/redis.conf"]
        volumes:
          - ./redis-cluster/6378/conf/redis.conf:/usr/local/etc/redis/redis.conf
          - ./redis-cluster/6378/data:/data
        ports:
          - "6378:6378"
          - "17002:17002"
        environment:
          - TZ=Asia/Shanghai
    
    
      redis6377:
        image: 'redis'
        container_name: redis6377
        command:
          ["redis-server", "/usr/local/etc/redis/redis.conf"]
        volumes:
          - ./redis-cluster/6377/conf/redis.conf:/usr/local/etc/redis/redis.conf
          - ./redis-cluster/6377/data:/data
        ports:
          - "6377:6377"
          - "17003:17003"
        environment:
          - TZ=Asia/Shanghai
    

    相关文章

      网友评论

          本文标题:Docker 部署 redis集群

          本文链接:https://www.haomeiwen.com/subject/ceppmktx.html