-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
254 lines (227 loc) · 4.92 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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
version: '2.0'
services:
# --- FRONT-END ---
# Static homepage
homepage:
container_name: "DataVisPlanner-home"
build:
context: ./homepage
dockerfile: Dockerfile-homepage
ports:
- 80:80
env_file:
- .env
# Meteor
# Data visualisations
meteor:
container_name: "DataVisPlanner-meteor"
env_file:
- .env
build:
context: ./meteor/app
dockerfile: Dockerfile-meteor # Production
# dockerfile: Dockerfile-meteor-dev # Development
volumes:
- .:/meteor/app/
depends_on:
- mongo
links:
- mongo
environment:
- MONGO_URL=mongodb://MONGOUSERNAME:MONGOPASSWORD@mongo:27017/meteor
ports:
- 3000:3000
# --- DATABASES ---
# Mongo
# Shared db between data visualisations and analyses
mongo:
container_name: "DataVisPlanner-mongo"
hostname: mongodb
build:
context: ./mongo/
dockerfile: Dockerfile-mongo
restart: always
environment:
- "MONGO_INITDB_ROOT_USERNAME=MONGOADMINUSERNAME"
- "MONGO_INITDB_ROOT_PASSWORD=MONGOADMINPASSWORD"
- "MONGO_INITDB_DATABASE=admin"
volumes:
- mongo:/data
ports:
- 27017:27017
# Mongo UI admin
mongoui:
container_name: "DataVisPlanner-mongo-ui"
image: mongoclient/mongoclient:latest
hostname: mongoclient
depends_on:
- mongo
volumes:
- mongo:/data
ports:
- 3300:3000
env_file:
- .env
# Redis
redis:
container_name: "DataVisPlanner-redis"
image: redis:3.2.7
# PostgreSQL
postgres:
container_name: "DataVisPlanner-postgres"
hostname: postgres
env_file:
- .env
image: postgres
restart: always
build:
context: ./airflow
dockerfile: Dockerfile-postgres
ports:
- 5432:5432
volumes:
- postgres:/var/lib/postgresql/data
# PostgreSQL UI admin
postgresui:
container_name: "DataVisPlanner-postgres-ui"
image: fenglc/pgadmin4
ports:
- 5050:5050
env_file:
- .env
links:
- postgres
depends_on:
- postgres
# --- DATA WORKFLOWS ---
# Jupyter Notebook
# For editing Jupyter Notebooks
jupyter:
container_name: "DataVisPlanner-jupyter"
env_file:
- .env
build:
context: ./airflow
dockerfile: Dockerfile-jupyter
args:
- JUPYTER_PASSWORD=${JUPYTER_PASSWORD}
depends_on:
- webserver
volumes_from:
- webserver
ports:
- 8888:8888
command: start-notebook.sh --no-browser
# Cloud9
# For editing Airflow DAGs
cloud9:
container_name: "DataVisPlanner-cloud9"
image: agungf/cloud9-ide
env_file:
- .env
depends_on:
- webserver
volumes_from:
- webserver
ports:
- 8181:8181
- 22
# Airflow
# Data analyses
# Copied and modified from the submodule airflow
webserver:
container_name: "DataVisPlanner-airflow-webserver"
build:
context: ./airflow
dockerfile: Dockerfile-airflow
depends_on:
- postgres
- redis
- mongo
restart: always
env_file:
- airflow.env
volumes:
- airflow:/usr/local/airflow/dags
links:
- mongo
- postgres
ports:
- 8080:8080
command: webserver
flower:
container_name: "DataVisPlanner-airflow-flower"
build:
context: ./airflow
dockerfile: Dockerfile-airflow
restart: always
depends_on:
- postgres
- redis
- mongo
env_file:
- airflow.env
ports:
- 5555:5555
links:
- mongo
- postgres
command: flower
scheduler:
container_name: "DataVisPlanner-airflow-scheduler"
build:
context: ./airflow
dockerfile: Dockerfile-airflow
restart: always
depends_on:
- postgres
- webserver
- mongo
volumes_from:
- webserver
env_file:
- airflow.env
links:
- mongo
- postgres
command: scheduler
worker:
container_name: "DataVisPlanner-airflow-worker"
build:
context: ./airflow
dockerfile: Dockerfile-airflow
restart: always
depends_on:
- postgres
- scheduler
- mongo
volumes_from:
- webserver
env_file:
- airflow.env
links:
- mongo
- postgres
command: worker
# --- MANAGEMENT ---
# Portainer
# For managing containers
# https://github.com/portainer/portainer-compose
portainer:
container_name: "DataVisPlanner-portainer"
image: portainer/portainer
ports:
- 9000:9000
volumes:
- /var/run/docker.sock:/var/run/docker.sock
watchtower:
image: centurylink/watchtower
container_name: "DataVisPlanner-portainer-watchtower"
command: --cleanup portainer-app
volumes:
- /var/run/docker.sock:/var/run/docker.sock
volumes:
mongo:
postgres:
redis:
airflow: