-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
executable file
·234 lines (217 loc) · 5.93 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
version: '2.1'
volumes:
collected_static: {}
services:
# QED Django front-end
qed_django:
build:
context: .
dockerfile: Dockerfile
args:
version: ${VERSION:-latest} # passing VERSION env var to Dockerfile as ARG, default = latest
#image: quanted/qed:${VERSION:-latest} # use qed image w/ tag = VERSION, default = latest
expose:
- "8080"
volumes:
- collected_static:/src/collected_static
- .:/src # map qed/ to container's /src for updating w/out rebuilding images
environment:
- REDIS_HOSTNAME=redis
#these echo in the environmental variable to the running docker container
#so that is can be picked up by the django settings
- DOCKER_HOSTNAME=${HOSTNAME}
#- DOCKER_SECRET_KEY=${SECRET_KEY}
links:
- redis
# Redis (message broker)
redis:
image: redis:latest
hostname: redis
expose:
- "6379"
# ubertool_cts nodejs submodule
cts_nodejs:
build: ./cts_nodejs
image: cts-nodejs
expose:
- "4000"
environment:
- NODEJS_HOST=cts_nodejs
- NODEJS_PORT=4000
- REDIS_HOSTNAME=redis
- REDIS_PORT=6379
links:
- redis
- worker_chemaxon
- worker_epi
- worker_test
- worker_sparc
- worker_measured
- worker_metabolizer
# # Celery worker - ChemAxon calc
worker_chemaxon:
build: ./cts_celery
image: cts-celery
command: celery worker -A tasks -Q chemaxon -l info -n chemaxon_worker -c 1
links:
- redis
- qed_django
environment:
- REDIS_HOSTNAME=redis
- DOCKER_HOSTNAME=${HOSTNAME}
# env_file:
# - ./${QED_CONFIG}
# # Celery worker - EPI Suite calc
worker_epi:
build: ./cts_celery
image: cts-celery
command: celery worker -A tasks -Q epi -l info -n epi_worker -c 1
links:
- redis
environment:
- REDIS_HOSTNAME=redis
- DOCKER_HOSTNAME=${HOSTNAME}
# env_file:
# - ./${QED_CONFIG}
# # Celery worker - TEST calc
worker_test:
build: ./cts_celery
image: cts-celery
command: celery worker -A tasks -Q test -l info -n test_worker -c 1
links:
- redis
environment:
- REDIS_HOSTNAME=redis
- DOCKER_HOSTNAME=${HOSTNAME}
# env_file:
# - ./${QED_CONFIG}
# # Celery worker - SPARC calc
worker_sparc:
build: ./cts_celery
image: cts-celery
command: celery worker -A tasks -Q sparc -l info -n sparc_worker -c 1
links:
- redis
environment:
- REDIS_HOSTNAME=redis
- DOCKER_HOSTNAME=${HOSTNAME}
# env_file:
# - ./${QED_CONFIG}
# # Celery worker - Measured (EPI) calc
worker_measured:
build: ./cts_celery
image: cts-celery
command: celery worker -A tasks -Q measured -l info -n measured_worker -c 1
links:
- redis
environment:
- REDIS_HOSTNAME=redis
- DOCKER_HOSTNAME=${HOSTNAME}
# env_file:
# - ./${QED_CONFIG}
# # Celery worker - Metabolizer calc
worker_metabolizer:
build: ./cts_celery
image: cts-celery
command: celery worker -A tasks -Q metabolizer -l info -n metabolizer_worker -c 1
links:
- redis
environment:
- REDIS_HOSTNAME=redis
- DOCKER_HOSTNAME=${HOSTNAME}
# env_file:
# - ./${QED_CONFIG}
# # Celery worker - cheminfo calc
worker_cheminfo:
build: ./cts_celery
image: cts-celery
command: celery worker -A tasks -Q cheminfo -l info -n cheminfo_worker -c 1
links:
- redis
environment:
- REDIS_HOSTNAME=redis
- DOCKER_HOSTNAME=${HOSTNAME}
# env_file:
# - ./${QED_CONFIG}
# # Celery worker - manager calc
worker_manager:
build: ./cts_celery
image: cts-celery
command: celery worker -A tasks -Q manager -l info -n manager_worker -c 1
links:
- redis
environment:
- REDIS_HOSTNAME=redis
- DOCKER_HOSTNAME=${HOSTNAME}
# env_file:
# - ./${QED_CONFIG}
qed_nginx:
restart: always
# build: ../cts_nginx
build: ./qed_nginx
ports:
- "80:80"
- "443:443"
links:
- qed_django:uwsgi_django # Nginx.conf can reference "qed_django" service with the hostname 'uwsgi' or 'qed_django'
- cts_nodejs:cts_nodejs
- qed_flask:uwsgi_flask
volumes:
- /var/www/nginx/certs:/etc/nginx/qed # this points to the keys directory
volumes_from:
- qed_django:ro # Mount all volumes from "qed_django" to NGINX, so it can access the collected static files
# flask_qed Flask back-end
qed_flask:
build: ./flask_qed
expose:
- "7777"
links:
- redis
- mongodb
- qed_celery
environment:
- REDIS_HOSTNAME=redis
- DOCKER_HOSTNAME=${HOSTNAME}
volumes:
- /var/www/sampreprocessed:/src/pram_flask/ubertool/ubertool/sam/bin/Preprocessed
- /var/www/samresults:/src/pram_flask/ubertool/ubertool/sam/bin/Results
- /var/www/qed-basins:/src/hms_flask/data/qed-basins
- collected_static:/src/collected_static
depends_on:
- mongodb
logging:
options:
max-size: "200k"
max-file: "10"
# mongoDB database container
mongodb:
image: mongo:latest
volumes:
- /var/www/mongodb:/data/db
expose:
- "27017"
# Celery container for async task execution
qed_celery:
build: ./flask_qed
volumes:
- /var/www/sampreprocessed:/src/pram_flask/ubertool/ubertool/sam/bin/Preprocessed
- /var/www/samresults:/src/pram_flask/ubertool/ubertool/sam/bin/Results
- /var/www/qed-basins:/src/hms_flask/data/qed-basins
- collected_static:/src/collected_static
links:
- redis
- mongodb
command: celery worker -A celery_cgi -Q qed --loglevel=INFO -c 2 -n qed_worker
environment:
- REDIS_HOSTNAME=redis
- DOCKER_HOSTNAME=${HOSTNAME}
logging:
options:
max-size: "200k"
max-file: "10"
hms_dotnetcore:
build:
context: ./windows/hms
dockerfile: Web.Services/Dockerfile
ports:
- "7778:80"