-
Notifications
You must be signed in to change notification settings - Fork 65
/
docker-compose.yml
73 lines (70 loc) · 2.82 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
services:
app:
image: stavshamir/springwolf-kafka-example:${SPRINGWOLF_VERSION}
links:
- kafka
environment:
BOOTSTRAP_SERVER: kafka:29092
BOOTSTRAP_SERVER_SASL: kafka:29093
KAFKA_SCHEMA_REGISTRY_URL: http://kafka-schema-registry:8081
ports:
- "8080:8080"
depends_on:
- kafka
kafka:
image: confluentinc/cp-kafka:latest
ports:
- "9092:9092" # plaintext - no authentication
- "9093:9093" # sasl
volumes:
- ./broker_jaas.conf:/etc/kafka/secrets/broker_jaas.conf
environment:
KAFKA_NODE_ID: 1
CLUSTER_ID: 'MkU3OEVBNTcwNTJENDM2Qk=='
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092, INTERNAL://kafka:29092, SASL_PLAINTEXT://0.0.0.0:9093, SASL_INTERNAL://kafka:29093, CONTROLLER://kafka:29099
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092,INTERNAL://kafka:29092, SASL_PLAINTEXT://localhost:9093,SASL_INTERNAL://kafka:29093
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,INTERNAL:PLAINTEXT, SASL_PLAINTEXT:SASL_PLAINTEXT,SASL_INTERNAL:SASL_PLAINTEXT, CONTROLLER:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
KAFKA_PROCESS_ROLES: 'controller,broker'
KAFKA_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
KAFKA_CONTROLLER_QUORUM_VOTERS: '1@kafka:29099'
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_SCHEMA_REGISTRY_URL: 'kafka-schema-registry:8081'
KAFKA_SASL_ENABLED_MECHANISMS: PLAIN
KAFKA_SASL_MECHANISM_INTER_BROKER_PROTOCOL: PLAIN
KAFKA_OPTS: -Djava.security.auth.login.config=/etc/kafka/secrets/broker_jaas.conf
kafka-schema-registry:
image: confluentinc/cp-schema-registry:latest
ports:
- "8081:8081"
profiles:
- test # avoid starting (and pulling) this container by default
environment:
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: kafka:29092
SCHEMA_REGISTRY_HOST_NAME: kafka-schema-registry
SCHEMA_REGISTRY_LISTENERS: http://0.0.0.0:8081
akhq:
image: tchiotludo/akhq:latest
ports:
- "8085:8080"
profiles:
- test # avoid starting (and pulling) this container by default
environment:
AKHQ_CONFIGURATION: |
akhq:
connections:
local:
properties:
bootstrap.servers: kafka:29092
schema-registry:
url: http://kafka-schema-registry:8081
type: confluent
local-sasl:
properties:
bootstrap.servers: kafka:29093
security.protocol: SASL_PLAINTEXT
sasl.jaas.config: org.apache.kafka.common.security.plain.PlainLoginModule required username="broker" password="broker-secret";
sasl.mechanism: PLAIN
schema-registry:
url: http://kafka-schema-registry:8081
type: confluent