-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
73 lines (68 loc) · 1.55 KB
/
docker-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
version: "3"
services:
zookeeper:
image: "zookeeper:3.6.3"
ports:
- "2181:2181"
environment:
ALLOW_ANONYMOUS_LOGIN: yes
kafka:
image: "bitnami/kafka:3"
ports:
- "9092:9092"
environment:
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_CREATE_TOPICS: "topic1:1:1"
KAFKA_BROKER_ID: 1
ALLOW_PLAINTEXT_LISTENER: yes
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT , PLAINTEXT_HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
depends_on:
- zookeeper
db:
image: postgres:latest
restart: always
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: example
POSTGRES_DB: my_db
ports:
- "5432:5432"
volumes:
- ./data:/var/lib/postgresql/data
marketer:
# platform: linux/amd64
build: ./marketer
restart: always
volumes:
- ./marketer:/home/app/
environment:
KAFKA_HOST: kafka:9092
KAFKA_TOPIC: topic1
ports:
- "3001:3001"
depends_on:
- db
- kafka
- customer
customer:
# platform: linux/amd64
build: ./customer
restart: always
volumes:
- ./customer:/home/app/
environment:
DB_HOST: db
DB_USER: root
DB_PASSWORD: example
DB_NAME: my_db
KAFKA_HOST: kafka:9092
KAFKA_TOPIC: topic1
ports:
- "3000:3000"
depends_on:
- kafka
- db