Repository navigation
Expand file tree
/
Copy pathdocker-compose.redpanda3.yaml
More file actions
172 lines (169 loc) · 6.72 KB
/
Copy pathdocker-compose.redpanda3.yaml
File metadata and controls
172 lines (169 loc) · 6.72 KB
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
version: '3.8'
volumes:
redpanda1: null
redpanda2: null
redpanda3: null
networks:
redpanda_network:
driver: bridge
services:
redpanda-1:
# build:
# context: ./components/redpanda
image: docker.redpanda.com/redpandadata/redpanda:v23.1.13
command:
- redpanda start
- --smp 1
- --overprovisioned
- --node-id 1
- --kafka-addr internal://0.0.0.0:9092,external://0.0.0.0:${REDPANDA_1_PORT}
# Address the broker advertises to clients that connect to the Kafka API.
# Use the internal addresses to connect to the Redpanda brokers
# from inside the same Docker network.
# Use the external addresses to connect to the Redpanda brokers
# from outside the Docker network.
- --advertise-kafka-addr internal://redpanda-1:9092,external://localhost:${REDPANDA_1_PORT}
- --pandaproxy-addr internal://0.0.0.0:8082,external://0.0.0.0:${REDPANDA_PROXY_1_PORT}
# Address the broker advertises to clients that connect to the HTTP Proxy.
- --advertise-pandaproxy-addr internal://redpanda-1:8082,external://localhost:${REDPANDA_PROXY_1_PORT}
- --schema-registry-addr internal://0.0.0.0:8081,external://0.0.0.0:${REDPANDA_SCHEMA_REGISTRY_PORT}
# Redpanda brokers use the RPC API to communicate with each other internally.
- --rpc-addr redpanda-1:33145
- --advertise-rpc-addr redpanda-1:33145
# # Set the log segment size to 16MB instead of 128MB to save disk on local machine (16MB min. size per partition)
# - rpk cluster config set log_segment_size 16777216
ports:
- ${REDPANDA_SCHEMA_REGISTRY_PORT}:${REDPANDA_SCHEMA_REGISTRY_PORT}
- ${REDPANDA_PROXY_1_PORT}:${REDPANDA_PROXY_1_PORT}
- ${REDPANDA_1_PORT}:${REDPANDA_1_PORT}
- 19644:9644
restart: always
volumes:
- redpanda1:/var/lib/redpanda/data
networks:
- redpanda_network
healthcheck:
test:
['CMD-SHELL', "rpk cluster health | grep -E 'Healthy:.+true' || exit 1"]
interval: 15s
timeout: 3s
retries: 5
start_period: 5s
redpanda-2:
# build:
# context: ./components/redpanda
image: docker.redpanda.com/redpandadata/redpanda:v23.1.13
command:
- redpanda start
- --smp 1
- --overprovisioned
- --node-id 2
- --seeds "redpanda-1:33145"
- --kafka-addr internal://0.0.0.0:9093,external://0.0.0.0:${REDPANDA_2_PORT}
# Address the broker advertises to clients that connect to the Kafka API.
# Use the internal addresses to connect to the Redpanda brokers
# from inside the same Docker network.
# Use the external addresses to connect to the Redpanda brokers
# from outside the Docker network.
- --advertise-kafka-addr internal://redpanda-2:9093,external://localhost:${REDPANDA_2_PORT}
- --pandaproxy-addr internal://0.0.0.0:8083,external://0.0.0.0:${REDPANDA_PROXY_2_PORT}
# Address the broker advertises to clients that connect to the HTTP Proxy.
- --advertise-pandaproxy-addr internal://redpanda-2:8083,external://localhost:${REDPANDA_PROXY_2_PORT}
- --schema-registry-addr internal://0.0.0.0:8081,external://0.0.0.0:18081
# Redpanda brokers use the RPC API to communicate with each other internally.
- --rpc-addr redpanda-2:33145
- --advertise-rpc-addr redpanda-2:33145
# # Set the log segment size to 16MB instead of 128MB to save disk on local machine (16MB min. size per partition)
# - rpk cluster config set log_segment_size 16777216
ports:
- ${REDPANDA_PROXY_2_PORT}:${REDPANDA_PROXY_2_PORT}
- ${REDPANDA_2_PORT}:${REDPANDA_2_PORT}
restart: always
volumes:
- redpanda2:/var/lib/redpanda/data
networks:
- redpanda_network
healthcheck:
test:
['CMD-SHELL', "rpk cluster health | grep -E 'Healthy:.+true' || exit 1"]
interval: 15s
timeout: 3s
retries: 5
start_period: 5s
depends_on:
- redpanda-1
redpanda-3:
# build:
# context: ./components/redpanda
image: docker.redpanda.com/redpandadata/redpanda:v23.1.13
command:
- redpanda start
- --smp 1
- --overprovisioned
- --node-id 3
- --seeds "redpanda-1:33145"
- --kafka-addr internal://0.0.0.0:9094,external://0.0.0.0:${REDPANDA_3_PORT}
# Address the broker advertises to clients that connect to the Kafka API.
# Use the internal addresses to connect to the Redpanda brokers
# from inside the same Docker network.
# Use the external addresses to connect to the Redpanda brokers
# from outside the Docker network.
- --advertise-kafka-addr internal://redpanda-3:9094,external://localhost:${REDPANDA_3_PORT}
- --pandaproxy-addr internal://0.0.0.0:8084,external://0.0.0.0:${REDPANDA_PROXY_3_PORT}
# Address the broker advertises to clients that connect to the HTTP Proxy.
- --advertise-pandaproxy-addr internal://redpanda-3:8084,external://localhost:${REDPANDA_PROXY_3_PORT}
- --schema-registry-addr internal://0.0.0.0:8081,external://0.0.0.0:18081
# Redpanda brokers use the RPC API to communicate with each other internally.
- --rpc-addr redpanda-3:33145
- --advertise-rpc-addr redpanda-3:33145
# # Set the log segment size to 16MB instead of 128MB to save disk on local machine (16MB min. size per partition)
# - rpk cluster config set log_segment_size 16777216
ports:
- ${REDPANDA_PROXY_3_PORT}:${REDPANDA_PROXY_3_PORT}
- ${REDPANDA_3_PORT}:${REDPANDA_3_PORT}
restart: always
volumes:
- redpanda3:/var/lib/redpanda/data
networks:
- redpanda_network
healthcheck:
test:
['CMD-SHELL', "rpk cluster health | grep -E 'Healthy:.+true' || exit 1"]
interval: 15s
timeout: 3s
retries: 5
start_period: 5s
depends_on:
- redpanda-1
console:
image: docker.redpanda.com/redpandadata/console:v2.2.5
entrypoint: /bin/sh
command: -c "echo \"$$CONSOLE_CONFIG_FILE\" > /tmp/config.yml; /app/console"
environment:
CONFIG_FILEPATH: /tmp/config.yml
CONSOLE_CONFIG_FILE: |
kafka:
brokers: ["redpanda-1:9092","redpanda-2:9093","redpanda-3:9094"]
schemaRegistry:
enabled: true
urls: ["http://redpanda-1:8081"]
redpanda:
adminApi:
enabled: true
urls: ["http://redpanda-1:9644"]
connect:
enabled: true
clusters:
- name: geov-connect-cluster
url: http://connect:8083
ports:
- ${REDPANDA_CONSOLE_PORT}:8080
networks:
- redpanda_network
depends_on:
redpanda-1:
condition: service_started
redpanda-2:
condition: service_started
redpanda-3:
condition: service_started