-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdocker-compose.yml
94 lines (84 loc) · 2.21 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
version: "2"
## NOTE NOTE!
# Because kafka needs to know it's own hostname, you either need to change it in this document (from kafka.local)
## Or add kafka.local to your /etc/hosts file (and point it at 127.0.0.1).
services:
# Main frontend
# Expose port with `- {PORT}:80` (i.e., your port goes on the left).
web-ui:
image: ponelat/petstore-kafka-web-ui:latest
restart: always
ports:
- "80:80"
environment:
CADDY_PORT: 80
PETS_HOST: "http://pets:80"
ADOPTIONS_HOST: "http://adoptions:80"
WEBSOCKET_HOST: "http://websocket:81"
# Secondary frontend, a CMAK app for looking at the Kafka cluster
# Note: You'll need to create a Cluster via its UI. Be sure to add 'zookeeper:2181' as the zookeeper host.
cmak:
image: ghcr.io/eshepelyuk/dckr/cmak-3.0.0.5:latest
restart: always
ports:
- "9000:9000"
environment:
ZK_HOSTS: "zookeeper:2181"
depends_on:
- zookeeper
- kafka
# Application Services
pets:
image: ponelat/petstore-kafka-pets:latest
restart: always
environment:
KAFKA_HOSTS: "kafka:9092"
DATA_BASEPATH: "/data"
volumes:
- "pets_data:/data"
adoptions:
image: ponelat/petstore-kafka-adoptions:latest
restart: always
environment:
KAFKA_HOSTS: "kafka:9092"
DATA_BASEPATH: "/data"
volumes:
- "adoptions_data:/data"
websocket:
image: ponelat/petstore-kafka-websocket:latest
restart: always
environment:
KAFKA_HOSTS: "kafka:9092"
DATA_BASEPATH: "/data"
volumes:
- "websocket_data:/data"
# Kafka services
zookeeper:
image: docker.io/bitnami/zookeeper:3.8
volumes:
- "zookeeper_data:/bitnami"
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
kafka:
image: docker.io/bitnami/kafka:3.2
volumes:
- "kafka_data:/bitnami"
ports:
- "9092:9092"
environment:
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
hostname: kafka.local
depends_on:
- zookeeper
volumes:
zookeeper_data:
driver: local
kafka_data:
driver: local
pets_data:
driver: local
adoptions_data:
driver: local
websocket_data:
driver: local