-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
75 lines (75 loc) · 3.38 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
version: '3'
networks:
default:
driver: bridge
name: "influencer"
services:
zookeeper:
image: 'bitnami/zookeeper:3.6.2'
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
ports:
- '2181:2181'
kafka:
image: 'bitnami/kafka:2.6.0'
environment:
- KAFKA_BROKER_ID=1
- KAFKA_LISTENERS=PLAINTEXT://:9092
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:9092
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
ports:
- '9092:9092'
depends_on:
- zookeeper
nsqlookupd:
image: nsqio/nsq
command: /nsqlookupd
ports:
- "4160:4160"
- "4161:4161"
nsqd:
image: nsqio/nsq
command: /nsqd --broadcast-address=localhost --lookupd-tcp-address=nsqlookupd:4160
depends_on:
- nsqlookupd
ports:
- "4150:4150"
- "4151:4151"
networks:
default:
aliases:
- nsqd
- localhost
nsqadmin:
image: nsqio/nsq
command: /nsqadmin --lookupd-http-address=nsqlookupd:4161
depends_on:
- nsqlookupd
ports:
- "4171:4171"
nsqInitializer:
image: curlimages/curl
network_mode: host
deploy:
restart_policy:
condition: on-failure
depends_on:
- nsqlookupd
command: [ "sh","-c","sleep 15 &&
curl -d '{ \"id\": 11, \"screen_name\": \"test1\", \"location\": \"US\", \"deleted_at\" : \"2021-01-30T21:13:42Z\" }\n
{ \"id\": 81, \"screen_name\": \"test81\", \"biography\": \"test81 bio\", \"profile_image\": \"www.twitter.com/img/test81\", \"updated_at\" : \"2021-02-05T21:13:42Z\" }\n
{ \"id\": 21, \"screen_name\": \"test2\", \"biography\": \"this is test 2\", \"location\": \"ES\", \"updated_at\" : \"2021-01-15T21:13:42Z\" }\n
{ \"id\": 31, \"screen_name\": \"test3\", \"biography\": \"test3 bio\", \"deleted_at\" : \"2021-01-31T21:13:42Z\" }\n
{ \"id\": 61, \"screen_name\": \"test6_change\", \"biography\": \"this is test 6 update\", \"location\": \"IT\", \"updated_at\" : \"2021-01-15T21:13:42Z\" }\n
{ \"id\": 41, \"screen_name\": \"test4\", \"biography\": \"this is test 4 update\", \"location\": \"MX\", \"updated_at\" : \"2021-01-01T21:13:42Z\" }\n
{ \"id\": 11, \"screen_name\": \"test1\", \"biography\": \"this is test 1\", \"location\": \"US\", \"updated_at\" : \"2021-01-29T21:13:42Z\" }'
http://localhost:4151/mpub?topic=twitter &&
curl -d '{ \"id\": 52, \"deleted_at\" : \"2021-01-02T21:13:42Z\" }\n
{ \"id\": 62, \"username\": \"test62_deleted\", \"about\": \"deleted by facebook\", \"deleted_at\" : \"2021-01-29T21:13:42Z\" }\n
{ \"id\": 72, \"username\": \"test72\", \"about\": \"new facebook user!\", \"image\" : \"www.facebook.com/img/test72.png\", \"location\" : \"Madrid, Spain\", \"updated_at\" : \"2021-01-20T21:13:42Z\" }\n
{ \"id\": 22, \"username\": \"test2_updated\", \"about\": \"updated about test22\", \"image\" : \"www.facebook.com/img/test22.png\", \"updated_at\" : \"2021-02-12T21:13:42Z\" }\n
{ \"id\": 52, \"username\": \"test52\", \"location\" : \"Chicago, US\", \"updated_at\" : \"2021-01-12T21:13:42Z\" }\n
{ \"id\": 42, \"username\": \"test4\", \"about\": \"this is test 4\", \"updated_at\" : \"2021-01-01T21:13:42Z\" }\n
{ \"id\": 32, \"username\": \"test32\", \"about\": \"update test32\", \"image\" : \"www.facebook.com/img/test72.png\", \"updated_at\" : \"2021-01-20T21:13:42Z\" }'
http://localhost:4151/mpub?topic=facebook" ]