-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
179 lines (165 loc) · 4.04 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
version: '3.3'
services:
kafka-zookeeper:
container_name: kafka-zookeeper
hostname: kafka-zookeeper
image: wurstmeister/zookeeper
ports:
- 2181:2181
networks:
- restaurants-data-scraper
kafka:
container_name: kafka
hostname: kafka
image: wurstmeister/kafka
command: [start-kafka.sh]
ports:
- 9092:9092
- 29092:29092
environment:
KAFKA_ADVERTISED_HOST_NAME: localhost # docker-machine ip
KAFKA_LISTENERS: "INTERNAL://:29092,EXTERNAL://:9092"
KAFKA_ADVERTISED_LISTENERS: "INTERNAL://kafka:29092,EXTERNAL://localhost:9092"
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT"
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
KAFKA_ZOOKEEPER_CONNECT: kafka-zookeeper:2181
KAFKA_ADVERTISED_PORT: 9092
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- kafka-zookeeper
networks:
- restaurants-data-scraper
kafdrop:
container_name: kafdrop
image: obsidiandynamics/kafdrop
ports:
- 9000:9000
environment:
KAFKA_BROKERCONNECT: "kafka:29092"
JVM_OPTS: "-Xms16M -Xmx48M -Xss180K -XX:-TieredCompilation -XX:+UseStringDeduplication -noverify"
depends_on:
- kafka
networks:
- restaurants-data-scraper
mongodb:
container_name: mongodb
image: mongo:latest
command: mongod
environment:
MONGO_DATA_DIR: /data/db
MONGO_LOG_DIR: /dev/null
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: root
ports:
- 27017:27017
volumes:
- mongodb-volume:/data/db
networks:
- restaurants-data-scraper
mongo-express:
container_name: mongo-express
image: mongo-express
restart: always
ports:
- 27018:8081
environment:
ME_CONFIG_MONGODB_SERVER: mongodb
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD: root
depends_on:
- mongodb
networks:
- restaurants-data-scraper
prometheus:
container_name: prometheus
image: prom/prometheus
volumes:
- prometheus-volume:/prometheus
- ./docker/prometheus/:/etc/prometheus/
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
ports:
- 9090:9090
restart: always
networks:
- restaurants-data-scraper
grafana:
container_name: grafana
image: grafana/grafana
restart: always
ports:
- 3000:3000
volumes:
- grafana-volume:/var/lib/grafana
- ./docker/grafana/provisioning:/etc/grafana/provisioning
- ./docker/grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards/
depends_on:
- prometheus
networks:
- restaurants-data-scraper
source-publisher:
container_name: source-publisher
build: "./source-publisher"
volumes:
- ~/.m2:/root/.m2
ports:
- 8080:8080
depends_on:
- kafka
expose:
- "8080"
networks:
- restaurants-data-scraper
scraper:
container_name: scraper
build: "./scraper"
volumes:
- ~/.m2:/root/.m2
ports:
- 8081:8081
expose:
- "8081"
depends_on:
- kafka
networks:
- restaurants-data-scraper
data-extractor:
container_name: data-extractor
build: "./data-extractor"
volumes:
- ~/.m2:/root/.m2
ports:
- 8082:8082
expose:
- "8082"
depends_on:
- kafka
- mongodb
networks:
- restaurants-data-scraper
kpi-publisher:
container_name: kpi-publisher
build: "./kpi-publisher"
volumes:
- ~/.m2:/root/.m2
ports:
- 8083:8083
- 8084:8084
expose:
- "8083"
- "8084"
depends_on:
- kafka
- mongodb
networks:
- restaurants-data-scraper
networks:
restaurants-data-scraper:
volumes:
grafana-volume: {}
prometheus-volume: {}
mongodb-volume: {}