forked from SnuK87/keycloak-kafka
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yml
75 lines (66 loc) · 2.18 KB
/
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
version: '3'
services:
keycloak:
image: keycloak-kafka
ports:
- "8080:8080"
environment:
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin
KAFKA_CLIENT_ID: keycloak
KAFKA_BOOTSTRAP_SERVERS: kafka:9092
KAFKA_CONFIG: Wwp7ICJyZWFsbU5hbWUiOiAicmVhbG0xIiwKICAiYnJva2VySXAiOiAia2Fma2EiLAogICJicm9rZXJQb3J0IjogIjkwOTIiLAogICJ0b3BpYyI6ICJ0b3BpYzEiCn0sCnsgInJlYWxtTmFtZSI6ICJyZWFsbTIiLAogICJicm9rZXJJcCI6ICJrYWZrYTIiLAogICJicm9rZXJQb3J0IjogIjkwOTMiLAogICJ0b3BpYyI6ICJ0b3BpYzIsdG9waWMzIiAgIAp9Cl0KCg==
command: start-dev
zookeeper:
restart: always
image: bitnami/zookeeper:lates
ports:
- "2181:2181"
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
kafka:
image: 'confluentinc/cp-kafka:7.2.6'
container_name: kafka
ports:
- '9092:9092'
environment:
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_BROKER_ID=1
- KAFKA_LISTENERS=PLAINTEXT://:9092
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
- KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1
- KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR=1
- KAFKA_TRANSACTION_STATE_LOG_MIN_ISR=1
- KAFKA_LOG_RETENTION_CHECK_INTERVAL_MS=5000
depends_on:
zookeeper:
condition: service_healthy
healthcheck:
test: [ "CMD", "sh", "-c", "nc -z -v -w5 localhost 9092" ]
interval: 5s
timeout: 5s
retries: 5
kafka2:
image: 'confluentinc/cp-kafka:7.2.6'
container_name: kafka2
ports:
- '9093:9092'
environment:
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_BROKER_ID=2
- KAFKA_LISTENERS=PLAINTEXT://:9093
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka2:9093
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
- KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=2
- KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR=1
- KAFKA_TRANSACTION_STATE_LOG_MIN_ISR=1
- KAFKA_LOG_RETENTION_CHECK_INTERVAL_MS=5000
depends_on:
zookeeper:
condition: service_healthy
healthcheck:
test: [ "CMD", "sh", "-c", "nc -z -v -w5 localhost 9093" ]
interval: 5s
timeout: 5s
retries: 5