-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
65 lines (58 loc) · 1.4 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
version: "3.8"
services:
api:
image: answer-event-store:latest
container_name: api
restart: on-failure
depends_on:
- mongo
- broker
- zookeeper
ports:
- "8080:8080"
volumes:
- ./db:/home/db
networks:
- products_network
mongo:
image: mongo:latest
container_name: bequestDB
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: rootpassword
ports:
- "27017:27017"
volumes:
- mongodb_data_container:/data/db
zookeeper:
image: confluentinc/cp-zookeeper:5.5.0
container_name: zookeeper
hostname: zookeeper
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
networks:
- products_network
broker:
image: confluentinc/cp-kafka:5.5.0
container_name: broker
hostname: broker
ports:
- "9092:9092"
depends_on:
- zookeeper
environment:
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://${DOCKER_HOST_IP:-host.docker.internal}:9092,PLAINTEXT_INTERNAL://broker:29092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_INTERNAL:PLAINTEXT
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
networks:
- products_network
volumes:
mongodb_data_container:
networks:
products_network:
driver: bridge