美文网首页
docker-compose部署nsq集群

docker-compose部署nsq集群

作者: 莫夏_b560 | 来源:发表于2019-01-11 11:53 被阅读0次

    两台机器上分别创建docker-compose.yml
    然后执行docker-compose up -d

    version: '2'
    services:
            nsqlookupd:
                    image: nsqio/nsq
                    command: /nsqlookupd
                    ports:
                            - "192.168.174.130:4160:4160"
                            - "192.168.174.130:4161:4161"
            nsqd:
                    image: nsqio/nsq
                    command: /nsqd --broadcast-address=192.168.174.130 --lookupd-tcp-address=192.168.174.130:4160
                    depends_on:
                            - nsqlookupd
                    ports:
                            - "192.168.174.130:4150:4150"
                            - "192.168.174.130:4151:4151"
            nsqadmin:
                    image: nsqio/nsq
                    command: /nsqadmin --lookupd-http-address=192.168.174.130:4161
                    depends_on:
                            - nsqlookupd
                    ports:
                            - "192.168.174.130:4171:4171"
    
    version: '2'
    services:
            nsqd:
                    image: nsqio/nsq
                    command: /nsqd --broadcast-address=192.168.174.131 --lookupd-tcp-address=192.168.174.130:4160
                    ports:
                            - "192.168.174.131:4150:4150"
                            - "192.168.174.131:4151:4151"
    

    相关文章

      网友评论

          本文标题:docker-compose部署nsq集群

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