-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.redpanda.yml
158 lines (158 loc) · 4.64 KB
/
docker-compose.redpanda.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
---
version: "3.7"
name: redpanda-quickstart
networks:
redpanda_network:
driver: bridge
volumes:
redpanda-0: null
redpanda-1: null
redpanda-2: null
services:
redpanda-0:
command:
- redpanda
- start
- --kafka-addr
- internal://0.0.0.0:9092,external://0.0.0.0:19092
# 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.
#
# address the broker advertises to clients that connect to the Kafka API.
- --advertise-kafka-addr
- internal://redpanda-0:9092,external://localhost:19092
- --pandaproxy-addr
- internal://0.0.0.0:8082,external://0.0.0.0:18082
# address the broker advertises to clients that connect to PandaProxy.
- --advertise-pandaproxy-addr
- internal://redpanda-0:8082,external://localhost:18082
- --schema-registry-addr
- redpanda-0:8081
# Redpanda brokers use the RPC API to communicate with eachother internally.
- --rpc-addr
- redpanda-0:33145
- --advertise-rpc-addr
- redpanda-0:33145
# tells Seastar (the framework Redpanda uses under the hood) to use 1 core on the system.
- --smp 2
# the amount of memory to make available to Redpanda.
- --memory 2G
# the amount of memory that's left for the Seastar subsystem.
# For development purposes this is set to 0.
- --reserve-memory 0M
# Redpanda won't assume it has all of the provisioned CPU
# (to accommodate Docker resource limitations).
- --overprovisioned
# enable logs for debugging.
- --default-log-level=debug
image: docker.redpanda.com/vectorized/redpanda:v22.3.11
container_name: redpanda-0
volumes:
- redpanda-0:/var/lib/redpanda/data
networks:
- redpanda_network
ports:
- 18081:8081
- 18082:8082
- 19092:9092
- 19644:9644
redpanda-1:
command:
- redpanda
- start
- --kafka-addr
- internal://0.0.0.0:9092,external://0.0.0.0:29092
- --advertise-kafka-addr
- internal://redpanda-1:9092,external://localhost:29092
- --pandaproxy-addr
- internal://0.0.0.0:8082,external://0.0.0.0:28082
- --advertise-pandaproxy-addr
- internal://redpanda-1:8082,external://localhost:28082
- --schema-registry-addr
- redpanda-1:8081
- --rpc-addr
- redpanda-1:33145
- --advertise-rpc-addr
- redpanda-1:33145
- --smp 2
- --memory 2G
- --reserve-memory 0M
- --overprovisioned
- --default-log-level=debug
- --seeds redpanda-0:33145
image: docker.redpanda.com/vectorized/redpanda:v22.3.11
container_name: redpanda-1
volumes:
- redpanda-1:/var/lib/redpanda/data
networks:
- redpanda_network
ports:
- 28081:8081
- 28082:8082
- 29092:9092
- 29644:9644
depends_on:
- redpanda-0
redpanda-2:
command:
- redpanda
- start
- --kafka-addr
- internal://0.0.0.0:9092,external://0.0.0.0:39092
- --advertise-kafka-addr
- internal://redpanda-2:9092,external://localhost:39092
- --pandaproxy-addr
- internal://0.0.0.0:8082,external://0.0.0.0:38082
- --advertise-pandaproxy-addr
- internal://redpanda-2:8082,external://localhost:38082
- --schema-registry-addr
- redpanda-2:8081
- --rpc-addr
- redpanda-2:33145
- --advertise-rpc-addr
- redpanda-2:33145
- --smp 2
- --memory 2G
- --reserve-memory 0M
- --overprovisioned
- --default-log-level=debug
- --seeds redpanda-0:33145
image: docker.redpanda.com/vectorized/redpanda:v22.3.11
container_name: redpanda-2
volumes:
- redpanda-2:/var/lib/redpanda/data
networks:
- redpanda_network
ports:
- 38081:8081
- 38082:8082
- 39092:9092
- 39644:9644
depends_on:
- redpanda-0
console:
container_name: redpanda-console
image: docker.redpanda.com/vectorized/console:v2.1.1
networks:
- redpanda_network
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-0:9092"]
schemaRegistry:
enabled: true
urls: ["http://redpanda-0:8081"]
redpanda:
adminApi:
enabled: true
urls: ["http://redpanda-0:9644"]
ports:
- 8080:8080
depends_on:
- redpanda-0