-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
85 lines (79 loc) · 2.83 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
version: "2"
services:
# Kafka Server & Zookeeper Docker Image
kafkaserver:
image: "spotify/kafka:latest"
container_name: kafka
# Configures docker image to run in bridge mode network
hostname: kafkaserver
networks:
- kafkanet
# Make a port available to services outside of Docker
ports:
- 2181:2181
- 9092:9092
environment:
ADVERTISED_HOST: kafkaserver
ADVERTISED_PORT: 9092
# Kafka Manager docker image, it is a web based tool for managing Apache Kafka.
kafka_manager:
image: "mzagar/kafka-manager-docker:1.3.3.4"
container_name: kafkamanager
#configures the kafka manager docker image to run in bridge mode network
networks:
- kafkanet
# Make a port available to services outside of Docker
ports:
- 9000:9000
# It Links kafka_manager container to kafkaserver container to communicate.
links:
- kafkaserver:kafkaserver
environment:
ZK_HOSTS: "kafkaserver:2181"
# Elasticsearch Docker Image
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.4.0
container_name: elasticsearch
# Make a port available to services outside of Docker
ports:
- 9200:9200
- 9300:9300
# Configures docker image to run in bridge mode network
networks:
- kafkanet
# Kibana Docker Image
kibana:
image: docker.elastic.co/kibana/kibana:6.4.0
container_name: kibana
# Make a port available to services outside of Docker
ports:
- 5601:5601
# It Links kibana container & elasticsearch container to communicate
links:
- elasticsearch:elasticsearch
# Configures docker image to run in bridge mode network
networks:
- kafkanet
# You can control the order of service startup and shutdown with the depends_on option.
depends_on: ['elasticsearch']
# Logstash Docker Image
logstash:
image: docker.elastic.co/logstash/logstash:6.4.0
container_name: logstash
# It Links elasticsearch container & kafkaserver container & logstash container to communicate
links:
- elasticsearch:elasticsearch
- kafkaserver:kafkaserver
# Configures docker image to run in bridge mode network
networks:
- kafkanet
# You can control the order of service startup and shutdown with the depends_on option.
depends_on: ['elasticsearch', 'kafkaserver']
# ount host volumes into docker containers to supply logstash.config file
volumes:
- '/private/config-dir:/usr/share/logstash/pipeline/'
#Use bridge network for all the container, keeping all the container in same network will simplify the communication between the container.
networks:
kafkanet:
driver: bridge
#https://medium.com/@caysever/docker-compose-network-b86e424fad82