docker-compose部署nsq集群

2019-01-11  本文已影响0人  莫夏_b560

两台机器上分别创建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"
上一篇下一篇

猜你喜欢

热点阅读