-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
84 lines (75 loc) · 1.88 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
version: '3.7'
services:
zoo1:
image: zookeeper
hostname: zoo1
container_name: zoo1
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_SERVER_ID: 1
ZOOKEEPER_SERVERS: zoo1:2888:3888
kafka1:
image: confluentinc/cp-kafka
hostname: kafka1
container_name: kafka1
ports:
- "9092:9092"
environment:
KAFKA_ZOOKEEPER_CONNECT: zoo1:2181
KAFKA_ADVERTISED_LISTENERS: LISTENER_INTERNAL://kafka1:29090,LISTENER_EXTERNAL://localhost:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: LISTENER_INTERNAL:PLAINTEXT,LISTENER_EXTERNAL:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: LISTENER_INTERNAL
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
depends_on:
- zoo1
producer:
container_name: producer-service
build:
context: ./producer
dockerfile: Dockerfile
ports:
- "3000:3000"
consumer:
container_name: consumer-service
build:
context: ./consumer
dockerfile: Dockerfile
ports:
- "3001:3001"
depends_on:
- kafka1
- elasticsearch
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.4.0
container_name: elasticsearch
restart: always
environment:
- ELASTIC_CLIENT_APIVERSIONING=true
- xpack.security.enabled=false
- discovery.type=single-node
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- elasticsearch-data-volume:/usr/share/elasticsearch/data
ports:
- 9200:9200
kibana:
container_name: kibana
image: docker.elastic.co/kibana/kibana:7.4.0
restart: always
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
ports:
- 5601:5601
depends_on:
- elasticsearch
volumes:
elasticsearch-data-volume:
driver: local