docker-compose 部署nsq

lookup 和 admin

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
version: "3.7"
services:
nsqlookupd:
image: nsqio/nsq
container_name: nsqlookupd
restart: always
ports:
- 4160:4160
- 4161:4161
volumes:
- /etc/localtime:/etc/localtime:ro
command: /nsqlookupd
nsqadmin:
image: nsqio/nsq
container_name: nsqadmin
restart: always
ports:
- 4171:4171
volumes:
- /etc/localtime:/etc/localtime:ro
command: /nsqadmin --lookupd-http-address=192.168.2.99:4161

nsqd

1
2
3
4
5
6
7
8
9
10
11
12
version: "3.7"
services:
nsqd:
image: nsqio/nsq
container_name: nsqd
restart: always
ports:
- 4150:4150
- 4151:4151
volumes:
- /etc/localtime:/etc/localtime:ro
command: /nsqd --broadcast-address=192.168.2.99 --lookupd-tcp-address=192.168.2.99:4160