This repository has been archived by the owner on Apr 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
215 lines (215 loc) · 5.44 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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
version: "3.3"
services:
# redis container
toppick-redis:
image: redis:alpine
container_name: toppick-redis
hostname: toppick-redis
domainname: divolte_divolte.io
ports:
- 6379:6379 # redis server
networks:
- divolte.io
# elastic container
elastic:
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.2
container_name: elastic
hostname: elastic
domainname: divolte_divolte.io
environment:
- cluster.name=elasticsearch
- discovery.type=single-node
- xpack.security.enabled=false
- network.bind_host=0.0.0.0
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ports:
- 9200:9200
- 9300:9300
networks:
- divolte.io
# kibana container
kibana:
image: docker.elastic.co/kibana/kibana:7.10.2
container_name: kibana
hostname: kibana
domainname: divolte_divolte.io
environment:
SERVER_NAME: kibana.divolte_divolte.io
ELASTICSEARCH_HOSTS: http://elastic:9200
LOGGING_QUIET: "true"
ports:
- 5601:5601
depends_on:
- elastic
links:
- elastic:elastic
networks:
- divolte.io
# Kafka/Zookeeper container
kafka:
image: krisgeus/docker-kafka
container_name: kafka
hostname: kafka
domainname: divolte_divolte.io
environment:
ADVERTISED_HOST: kafka
LOG_RETENTION_HOURS: 1
AUTO_CREATE_TOPICS: "false"
KAFKA_CREATE_TOPICS: divolte:4:1
ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,INTERNAL://localhost:9093
LISTENERS: PLAINTEXT://0.0.0.0:9092,INTERNAL://0.0.0.0:9093
SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,INTERNAL:PLAINTEXT
INTER_BROKER: INTERNAL
ports:
- 9092:9092 # kafka broker
- 2181:2181 # Zookeeper
networks:
- divolte.io
# divolte clickstream collector
clickstream-collector:
build:
context: ./divolte
container_name: clickstream-collector
hostname: clickstream-collector
domainname: divolte_divolte.io
environment:
DIVOLTE_HDFS_ENABLED: "false"
DIVOLTE_KAFKA_BROKER_LIST: kafka:9092
DIVOLTE_CONF_DIR: /etc/shop/divolte
ports:
- 8290:8290
depends_on:
- kafka
links:
- kafka:kafka
networks:
- divolte.io
# divolte shop API for communication with Elastic
shop-api:
build:
context: ./service
container_name: shop-api
hostname: shop-api
domainname: divolte_divolte.io
environment:
ELASTICSEARCH_HOSTS: "[\"elastic\"]"
ELASTICSEARCH_CLUSTER_NAME: elasticsearch
JAVA_OPTS: "-Xms512m -Xmx512m"
ports:
- 8080:8080
- 8081:8081
depends_on:
- clickstream-collector
- elastic
links:
- clickstream-collector:clickstream-collector
- elastic:elastic
networks:
- divolte.io
# Divolte shop top-pick consumer
toppick-consumer:
build:
context: ./top-pick-service
dockerfile: Dockerfile.consumer
container_name: toppick-consumer
hostname: toppick-consumer
domainname: divolte_divolte.io
environment:
REDIS_HOST_PORT: "toppick-redis:6379"
KAFKA_BROKERS: "kafka:9092"
KAFKA_TOPIC: divolte
ELASTIC_HOST_PORT: "elastic:9200"
depends_on:
- toppick-redis
- kafka
- elastic
links:
- toppick-redis:toppick-redis
- kafka:kafka
- elastic:elastic
networks:
- divolte.io
# Divolte shop top-pick bandit
toppick-bandit:
build:
context: ./top-pick-service
dockerfile: Dockerfile.bandit
container_name: toppick-bandit
hostname: toppick-bandit
domainname: divolte_divolte.io
environment:
REDIS_HOST_PORT: "toppick-redis:6379"
BIND_PORT: 8989
BIND_HOST: 0.0.0.0
ports:
- 8989:8989
depends_on:
- toppick-redis
links:
- toppick-redis:toppick-redis
networks:
- divolte.io
# container serving the webshop
shop-webapp:
build:
context: ./webapp
container_name: shop-webapp
hostname: shop-webapp
domainname: divolte_divolte.io
environment:
SHOP_API_URL: "http://shop-api:8080/api"
SHOP_BANDIT_URL: "http://toppick-bandit:8989/item"
SHOP_DIVOLTE_URL: "//localhost:8290/divolte.js"
SHOP_WEBAPP_SECRET: "foo"
SHOP_WEBAPP_PORT: 9011
ports:
- 9011:9011
depends_on:
- clickstream-collector
- toppick-bandit
- shop-api
links:
- clickstream-collector:clickstream-collector
- toppick-bandit:toppick-bandit
- shop-api:shop-api
networks:
- divolte.io
# spark container analyzing the clickstream
clickstream-analyzer:
build:
context: ./spark-container
container_name: clickstream-analyzer
hostname: clickstream-analyzer
environment:
KAFKA_BROKERS: "kafka:9092"
KAFKA_TOPIC: "divolte"
SPARK_JOB_CLASS: "sparkjob.SparkEventsPerMinute"
ports:
- 7077:7077 # spark master
- 4040:4040 # spark web UI
- 18080:18080 # history server
depends_on:
- kafka
links:
- kafka:kafka
networks:
- divolte.io
# divolte-druid:
# # image: fokkodriesprong/docker-druid
# image: shop/divolte-druid
# container_name: divolte-druid
# hostname: divolte-druid
# domainname: divolte_divolte.io
# volumes:
# - /tmp/mysqldivoltedata:/var/lib/mysql
# ports:
# - 8981:8081
# depends_on:
# - kafka
# links:
# - kafka:kafka
# networks:
# - divolte.io
networks:
divolte.io:
driver: bridge