Skip to content

Commit e68a29d

Browse files
committed
Kafka cluster
1 parent 66a6cec commit e68a29d

10 files changed

+82
-10
lines changed

elastic/docker-compose.yml

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: "3.9"
21
services:
32
elastic:
43
image: elasticsearch:8.12.2

java/docker-compose.yml

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: "3.9"
21
services:
32
echo-server:
43
image: romanowalex/echo-server:v2.0

kafka/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# Kafka and Zookeeper
22

33
* [Single Node](docker-compose.yml)
4+
* [Cluster](docker-compose.cluster.yml)

kafka/docker-compose.cluster.yml

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
services:
2+
zookeeper:
3+
image: confluentinc/cp-zookeeper:7.7.1
4+
container_name: zookeeper
5+
environment:
6+
ZOOKEEPER_CLIENT_PORT: 2181
7+
ZOOKEEPER_TICK_TIME: 2000
8+
healthcheck:
9+
test: [ "CMD-SHELL", "nc -z localhost 2181 || exit -1" ]
10+
interval: 10s
11+
timeout: 5s
12+
retries: 10
13+
ports:
14+
- "2181:2181"
15+
16+
kafka-1:
17+
image: confluentinc/cp-kafka:7.7.1
18+
container_name: kafka-1
19+
ports:
20+
- "9092:9092"
21+
environment:
22+
KAFKA_BROKER_ID: 1
23+
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
24+
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka-1:29092,EXTERNAL://localhost:9092
25+
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT
26+
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
27+
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
28+
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
29+
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
30+
healthcheck:
31+
test: [ "CMD-SHELL", "kafka-topics --bootstrap-server localhost:9092 --list" ]
32+
interval: 10s
33+
timeout: 5s
34+
retries: 10
35+
depends_on:
36+
zookeeper:
37+
condition: service_healthy
38+
39+
kafka-2:
40+
image: confluentinc/cp-kafka:7.7.1
41+
container_name: kafka-2
42+
ports:
43+
- "9093:9093"
44+
environment:
45+
KAFKA_BROKER_ID: 2
46+
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
47+
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka-2:29093,EXTERNAL://localhost:9093
48+
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT
49+
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
50+
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
51+
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
52+
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
53+
healthcheck:
54+
test: [ "CMD-SHELL", "kafka-topics --bootstrap-server localhost:9093 --list" ]
55+
interval: 10s
56+
timeout: 5s
57+
retries: 10
58+
depends_on:
59+
zookeeper:
60+
condition: service_healthy
61+
62+
console:
63+
image: docker.redpanda.com/redpandadata/console:latest
64+
container_name: console
65+
environment:
66+
KAFKA_BROKERS: "kafka-1:29092,kafka-2:29093"
67+
ports:
68+
- "8081:8080"
69+
healthcheck:
70+
test: [ "CMD-SHELL", "curl --fail http://localhost:8080 || exit 1" ]
71+
interval: 5s
72+
timeout: 5s
73+
retries: 5
74+
depends_on:
75+
kafka-1:
76+
condition: service_healthy
77+
kafka-2:
78+
condition: service_healthy

kafka/docker-compose.yml

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: "3.9"
21
services:
32
zookeeper:
43
image: confluentinc/cp-zookeeper:7.7.1

logging/docker-compose.yml

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: "3.9"
21
services:
32
fluent-bit:
43
image: fluent/fluent-bit:3.1.7-debug

minio/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ $ mc alias set local http://localhost:9000 program qwerty123
55
$ mc mb local/my-bucket
66
$ mc mv data.txt local/my-bucket/
77

8-
```
8+
```

minio/docker-compose.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: "3.9"
2-
31
x-minio-common: &minio-common
42
image:
53
minio/minio:latest
@@ -50,4 +48,4 @@ services:
5048

5149
volumes:
5250
data1:
53-
data2:
51+
data2:

minio/nginx.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,4 @@ http {
8484
proxy_pass http://console;
8585
}
8686
}
87-
}
87+
}

postgres/docker-compose.yml

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: "3.9"
21
services:
32
postgres:
43
build: .

0 commit comments

Comments
 (0)