-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
82 lines (74 loc) · 3.02 KB
/
compose.yaml
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
version: "3"
services:
# ------------------- postgres -------------------
postgres:
image: 'postgres:latest'
restart: always
ports:
- '5432:5432'
volumes:
# - db-data:/var/lib/postgresql/data
- ./sql/create_tables_order_intake.sql:/docker-entrypoint-initdb.d/create_tables_order_intake.sql
- ./sql/create_tables_order_overdue.sql:/docker-entrypoint-initdb.d/create_tables_order_overdue.sql
- ./sql/create_tables_inform_other_systems.sql:/docker-entrypoint-initdb.d/create_tables_inform_other_systems.sql
- ./sql/create_tables_order_shipment.sql:/docker-entrypoint-initdb.d/create_tables_order_shipment.sql
environment:
POSTGRES_USER: test
POSTGRES_PASSWORD: testpw
# ------------------- zookeeper -------------------
zookeeper:
image: 'bitnami/zookeeper:latest'
ports:
- '2181:2181'
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
# ------------------- kafka -------------------
kafka:
image: 'bitnami/kafka:latest'
restart: always
ports:
- "9093:9093"
environment:
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=KAFKA_CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT
- KAFKA_CFG_LISTENERS=KAFKA_CLIENT://:9092,EXTERNAL://:9093
- KAFKA_CFG_ADVERTISED_LISTENERS=KAFKA_CLIENT://kafka:9092, EXTERNAL://localhost:9093
- KAFKA_INTER_BROKER_LISTENER_NAME=KAFKA_CLIENT
depends_on:
- zookeeper
# ------------------- kafka init -------------------
kafka-init:
container_name: "kafka-init"
image: bitnami/kafka:3.1.0
entrypoint: /bin/sh -c
command: >
"
## Create Kafka Topics
/opt/bitnami/kafka/bin/kafka-topics.sh --create --bootstrap-server kafka:9092 --topic order --partitions 3 --replication-factor 1
/opt/bitnami/kafka/bin/kafka-topics.sh --create --bootstrap-server kafka:9092 --topic order-created --partitions 3 --replication-factor 1
/opt/bitnami/kafka/bin/kafka-topics.sh --create --bootstrap-server kafka:9092 --topic order-to-external-team-one --partitions 3 --replication-factor 1
/opt/bitnami/kafka/bin/kafka-topics.sh --create --bootstrap-server kafka:9092 --topic order-overdue --partitions 3 --replication-factor 1
/opt/bitnami/kafka/bin/kafka-topics.sh --create --bootstrap-server kafka:9092 --topic order-shipped --partitions 3 --replication-factor 1
/opt/bitnami/kafka/bin/kafka-topics.sh --create --bootstrap-server kafka:9092 --topic dummy --partitions 3 --replication-factor 1
"
depends_on:
- kafka
# ------------------- akhq -------------------
akhq:
image: tchiotludo/akhq
container_name: akhq
restart: always
environment:
AKHQ_CONFIGURATION: |
akhq:
connections:
docker-kafka-server:
properties:
bootstrap.servers: "kafka:9092"
ports:
- "9080:8080"
depends_on:
- kafka
#volumes:
# db-data: