-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
199 lines (181 loc) · 4.06 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
version: "3"
services:
models:
image: tp33/django
container_name: models
external_links:
- mysql:db
volumes:
- .:/app
expose:
- "8000"
# ports:
# - "8001:8000"
networks:
- backend
- service_mesh
command: bash -c "python ./isa/manage.py makemigrations && python ./isa/manage.py migrate && python ./isa/manage.py loaddata ./isa/db.json && mod_wsgi-express start-server --working-directory ./isa --reload-on-changes ./isa/isa/wsgi.py"
exp:
image: tp33/django
container_name: exp
networks:
- service_mesh
- public
expose:
- "8000"
# ports:
# - "8002:8000"
volumes:
- .:/app
command: "mod_wsgi-express start-server --working-directory ./exp --reload-on-changes exp/exp/wsgi.py"
logging:
driver: "none"
web:
image: tp33/django
container_name: web
networks:
- public
expose:
- "8000"
# ports:
# - "8000:8000"
volumes:
- .:/app
command: "mod_wsgi-express start-server --working-directory ./web --reload-on-changes web/web/wsgi.py"
web2:
image: tp33/django
container_name: web2
networks:
- public
expose:
- "8000"
volumes:
- .:/app
command: "mod_wsgi-express start-server --working-directory ./web --reload-on-changes web/web/wsgi.py"
haproxy:
image: haproxy:1.8
container_name: haproxy
depends_on:
- web
- web2
volumes:
- ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg
ports:
- "80:80"
- "1936:1936"
networks:
- public
logging:
driver: "none"
kafka:
image: spotify/kafka
container_name: kafka
networks:
- batch_network
- service_mesh
environment:
ADVERTISED_HOST: kafka
ADVERTISED_PORT: 9092
hostname: kafka
es:
image: elasticsearch:7.4.0
container_name: es
environment:
- discovery.type=single-node
networks:
- service_mesh
- mod_exp_network
- batch_network
expose:
- "9200"
batch:
image: tp33/django
container_name: batch
networks:
- batch_network
depends_on:
- es
volumes:
- .:/app
command: bash -c "python ./batch/search_consumer.py & python ./batch/view_count.py & python ./batch/view_updater.py"
restart: on-failure
selenium-chrome:
image: selenium/standalone-chrome
container_name: selenium-chrome
networks:
- service_mesh
- public
expose:
- "4444"
depends_on:
- es
selenium-test:
image: tp33/django
container_name: selenium-test
networks:
- service_mesh
volumes:
- ./selenium:/app
command: bash -c "pip install selenium==3.141.0 && pip install requests && python selenium_tests.py"
depends_on:
- selenium-chrome
spark-master:
image: gettyimages/spark
command: bin/spark-class org.apache.spark.deploy.master.Master -h spark-master
container_name: spark-master
hostname: spark-master
environment:
MASTER: spark://spark-master:7077
SPARK_CONF_DIR: /conf
expose:
- 7001
- 7002
- 7003
- 7004
- 7005
- 7006
- 7077
- 6066
ports:
- 4040:4040
- 6066:6066
- 7077:7077
- 8080:8080
volumes:
- ./batch:/tmp/data
links:
- models
networks:
- service_mesh
spark-worker:
image: gettyimages/spark
command: bin/spark-class org.apache.spark.deploy.worker.Worker spark://spark-master:7077
container_name: spark-worker
hostname: spark-worker
environment:
SPARK_CONF_DIR: /conf
SPARK_WORKER_CORES: 2
SPARK_WORKER_MEMORY: 512m
SPARK_WORKER_PORT: 8881
SPARK_WORKER_WEBUI_PORT: 8081
expose:
- 7012
- 7013
- 7014
- 7015
- 7016
- 8881
ports:
- 8081:8081
volumes:
- ./batch:/tmp/data
networks:
- service_mesh
depends_on:
- spark-master
networks:
backend:
service_mesh:
public:
batch_network:
mod_exp_network: