-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
178 lines (171 loc) · 5.46 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
version: '3'
services:
zookeeper:
image: "apachepulsar/pulsar:3.2.0"
container_name: zookeeper
restart: on-failure
environment:
- metadataStoreUrl=zk:zookeeper:2181
command: >
bash -c "bin/apply-config-from-env.py conf/zookeeper.conf && \
bin/generate-zookeeper-config.sh conf/zookeeper.conf && \
exec bin/pulsar zookeeper"
healthcheck:
test: ["CMD", "bin/pulsar-zookeeper-ruok.sh"]
interval: 10s
timeout: 5s
retries: 30
pulsar-init:
image: "apachepulsar/pulsar:3.2.0"
container_name: pulsar-init
hostname: pulsar-init
command: >
bin/pulsar initialize-cluster-metadata \
--cluster dev \
--zookeeper zookeeper:2181 \
--configuration-store zookeeper:2181 \
--web-service-url http://localhost:8081 \
--broker-service-url pulsar://localhost:6651
depends_on:
zookeeper:
condition: service_healthy
bookie:
image: "apachepulsar/pulsar:3.2.0"
container_name: bookie
restart: on-failure
depends_on:
zookeeper:
condition: service_healthy
pulsar-init:
condition: service_completed_successfully
environment:
- clusterName=dev
- zkServers=zookeeper:2181
- metadataServiceUri=metadata-store:zk:zookeeper:2181
command: bash -c "bin/apply-config-from-env.py conf/bookkeeper.conf
&& exec bin/pulsar bookie"
broker1:
image: "apachepulsar/pulsar:3.2.0"
container_name: broker1
hostname: broker1
restart: on-failure
depends_on:
zookeeper:
condition: service_healthy
bookie:
condition: service_started
environment:
- brokerServicePort=6651
- webServicePort=8081
- metadataStoreUrl=zk:zookeeper:2181
- zookeeperServers=zookeeper:2181
- clusterName=dev
- managedLedgerDefaultEnsembleSize=1
- managedLedgerDefaultWriteQuorum=1
- managedLedgerDefaultAckQuorum=1
- advertisedAddress=broker1
- advertisedListeners=external:pulsar://broker1:6651
ports:
- "6651:6651"
- "8081:8081"
command: bash -c "bin/apply-config-from-env.py conf/broker.conf
&& exec bin/pulsar broker"
healthcheck:
test: ["CMD-SHELL", "bin/pulsar-admin --admin-url http://localhost:8081 brokers healthcheck | grep ok"]
interval: 10s
timeout: 30s
retries: 5
start_period: 30s
broker2:
image: "apachepulsar/pulsar:3.2.0"
container_name: broker2
hostname: broker2
restart: on-failure
depends_on:
zookeeper:
condition: service_healthy
bookie:
condition: service_started
environment:
- brokerServicePort=6652
- webServicePort=8082
- metadataStoreUrl=zk:zookeeper:2181
- zookeeperServers=zookeeper:2181
- clusterName=dev
- managedLedgerDefaultEnsembleSize=1
- managedLedgerDefaultWriteQuorum=1
- managedLedgerDefaultAckQuorum=1
- advertisedAddress=broker2
- advertisedListeners=external:pulsar://broker2:6652
ports:
- "6652:6652"
- "8082:8082"
command: bash -c "bin/apply-config-from-env.py conf/broker.conf
&& exec bin/pulsar broker"
healthcheck:
test: ["CMD-SHELL", "bin/pulsar-admin --admin-url http://localhost:8082 brokers healthcheck | grep ok"]
interval: 10s
timeout: 30s
retries: 5
start_period: 30s
broker3:
image: "apachepulsar/pulsar:3.2.0"
container_name: broker3
hostname: broker3
restart: on-failure
depends_on:
zookeeper:
condition: service_healthy
bookie:
condition: service_started
environment:
- brokerServicePort=6653
- webServicePort=8083
- metadataStoreUrl=zk:zookeeper:2181
- zookeeperServers=zookeeper:2181
- clusterName=dev
- managedLedgerDefaultEnsembleSize=1
- managedLedgerDefaultWriteQuorum=1
- managedLedgerDefaultAckQuorum=1
- advertisedAddress=broker3
- advertisedListeners=external:pulsar://broker3:6653
ports:
- "6653:6653"
- "8083:8083"
command: bash -c "bin/apply-config-from-env.py conf/broker.conf
&& exec bin/pulsar broker"
healthcheck:
test: ["CMD-SHELL", "bin/pulsar-admin --admin-url http://localhost:8083 brokers healthcheck | grep ok"]
interval: 10s
timeout: 30s
retries: 5
start_period: 30s
pulsar:
image: "apachepulsar/pulsar:3.2.0"
container_name: pulsar
restart: always
ports:
- '6650:6650'
- '8080:8080'
environment:
- PULSAR_PREFIX_advertisedAddress=pulsar
- PULSAR_PREFIX_allowAutoSubscriptionCreation=true
- PULSAR_PREFIX_allowAutoTopicCreation=true
- PULSAR_PREFIX_allowAutoTopicCreationType=partitioned
- PULSAR_PREFIX_brokerDeleteInactiveTopicsEnabled=false
- PULSAR_PREFIX_maxMessageSize=52428800
- PULSAR_PREFIX_systemTopicEnabled=true
- PULSAR_PREFIX_topicLevelPoliciesEnabled=true
- PULSAR_PREFIX_acknowledgmentAtBatchIndexLevelEnabled=true
- PULSAR_PREFIX_maxUnackedMessagesPerConsumer=500000
- PULSAR_PREFIX_maxUnackedMessagesPerSubscription=5000000
command:
- "/bin/bash"
- "-c"
- "/pulsar/bin/apply-config-from-env.py /pulsar/conf/standalone.conf && /pulsar/bin/pulsar standalone"
healthcheck:
test: ["CMD-SHELL", "bin/pulsar-admin brokers healthcheck | grep ok"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s