-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-local.yml
299 lines (282 loc) · 8.61 KB
/
docker-compose-local.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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
version: '2.1'
volumes:
collected_static: {}
services:
# QED Django front-end
qed_django:
restart: unless-stopped
image: dbsmith88/qed_django # use qed image w/ tag = VERSION, default = latest
expose:
- "8080"
command: ["/bin/bash", "/src/docker_start_local.sh"]
volumes:
- .:/src # map qed/ to container's /src for updating w/out rebuilding images
- ./static_qed:/src/collected_static
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=docker
#- DOCKER_SECRET_KEY=${SECRET_KEY}
- HMS_RELEASE=${HMS_RELASE:-0}
- IN_PROD=${IN_PROD:-1}
- IN_DOCKER=True
- HMS_AQUATOX_WEBAPP=True
links:
- redis
- mongodb
# Redis (message broker)
redis:
restart: unless-stopped
image: redis:latest
hostname: redis
command: redis-server /usr/local/etc/redis/redis.conf
volumes:
- ./redis.config:/usr/local/etc/redis/redis.conf
expose:
- "6379"
# ubertool_cts nodejs submodule
# cts_nodejs:
# restart: unless-stopped
# build: ./cts_nodejs
# # image: cts-nodejs
# image: quanted/cts_nodejs
# expose:
# - "4000"
# environment:
# - NODEJS_HOST=cts_nodejs
# - NODEJS_PORT=4000
# - REDIS_HOSTNAME=redis
# - REDIS_PORT=6379
# links:
# - redis
# # volumes:
# # - ./cts_nodejs:/src
# # Celery worker - manager calc
# worker_manager:
# restart: unless-stopped
# build:
# context: ./cts_celery
# dockerfile: Dockerfile
# # image: cts-celery
# image: quanted/cts_celery
# # command: celery worker -A tasks -Q manager_queue -l info -n manager_worker -c 1
# command: celery -A tasks worker -Q manager_queue -l info -n manager_worker -c 1
# links:
# - redis
# environment:
# - REDIS_HOSTNAME=redis
# - DOCKER_HOSTNAME=${HOSTNAME}
# volumes:
# - ./cts_celery:/src
# # Celery worker - cts calc
# worker_cts:
# restart: unless-stopped
# build:
# context: ./cts_celery
# dockerfile: Dockerfile
# # image: cts-celery
# image: quanted/cts_celery
# # command: celery worker -A tasks -Q cts_queue -l info -n cts_worker -c 2
# command: celery -A tasks worker -Q cts_queue -l info -n cts_worker -c 2
# links:
# - redis++
# - qed_django
# environment:
# - REDIS_HOSTNAME=redis
# - DOCKER_HOSTNAME=${HOSTNAME}
# volumes:
# - ./cts_celery:/src
qed_nginx:
restart: unless-stopped
# build: ../cts_nginx
build:
context: ./qed_nginx
args:
config: nginx_basic.conf
ports:
- "8080:80"
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
# - cyan-api:uwsgi_flask
# volumes:
# - /var/www/nginx/certs:/etc/nginx/qed # this points to the keys directory
# - /etc/letsencrypt:/etc/letsencrypt # certs from letsencrypt (uses certbot)
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:
restart: unless-stopped
image: dbsmith88/flask_qed:latest # use qed image w/ tag = VERSION, default = latest
expose:
- "7777"
links:
- redis
- mongodb
- qed_celery
environment:
- REDIS_HOSTNAME=redis
- DOCKER_HOSTNAME=docker
volumes:
- ./flask_qed:/src
# - /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
# - /var/www/app_data/hms:/src/hms-data
depends_on:
- mongodb
# logging:
# options:
# max-size: "200k"
# max-file: "10"
# mongoDB database container
mongodb:
restart: unless-stopped
image: mongo:latest
volumes:
- /var/www/mongodb:/data/db
expose:
- "27017"
ports:
- "27017:27017"
# Celery container for async task execution
qed_celery:
restart: unless-stopped
image: dbsmith88/flask_qed:latest
volumes:
- ./flask_qed:/src
# - /var/www/sampreprocessed:/src/pram_flask/ubertool/ubertool/sam/bin/Preprocessed
# - "../samresults:/src/pram_flask/ubertool/ubertool/sam/bin/Results"
# - "../qed-basins:/src/hms_flask/data/qed-basins"
# - collected_static:/src/collected_static
links:
- redis
- mongodb
command: conda run -n pyenv --no-capture-output celery -A celery_cgi worker -Q qed --loglevel=INFO -n qed_worker --uid=daemon
environment:
- REDIS_HOSTNAME=redis
- DOCKER_HOSTNAME=docker
- DASK_SCHEDULER=dask_scheduler:8786
# - C_FORCE_ROOT=TRUE
# logging:
# options:
# max-size: "200k"
# max-file: "10"
hms_dotnetcore:
restart: unless-stopped
# image: qed_hms_dotnetcore
image: dbsmith88/hms_dotnetcore
# build:
# context: ./windows/hms
# dockerfile: ./Web.Services/Dockerfile
environment:
- MONGODB=mongodb
- FLASK_SERVER=http://qed_nginx:7777
- GOOGLE_API_KEY=${GOOGLE_API_KEY}
expose:
- "80"
volumes:
- "./windows/hms/Web.Services/App_Data:/app/App_Data"
# Dask Containers
dask_scheduler:
restart: unless-stopped
image: dbsmith88/qed-dask:dev-np
# image: qed-dask-local
hostname: dask-scheduler
expose:
- 8786
- 8787
command: ["conda", "run", "-n", "pyenv", "--no-capture-output", "dask-scheduler"]
dask_worker:
restart: unless-stopped
image: dbsmith88/qed-dask:dev-np
# image: qed-dask-local
hostname: dask-worker
command: ["conda", "run", "-n", "pyenv", "--no-capture-output", "dask-worker", "dask_scheduler:8786"]
environment:
PYTHONPATH: '/src:/src/qed:/src/qed/flask_qed'
IN_DOCKER: "True"
HMS_BACKEND_SERVER_INTERNAL: "http://hms_dotnetcore:80/"
HMS_WORKFLOW_BACKEND: "https://ceamdev.ceeopdev.net/hms/rest/"
volumes:
- ".:/src/qed"
# Apache Tomcat container
# qed-tomcat:
# restart: unless-stopped
# build:
# # context: ./qed_tomcat
# context: .
# dockerfile: Dockerfile_Tomcat
# # image: cts_tomcat:${VERSION:-latest}
# image: quanted/qed-tomcat
# expose:
# - "8080"
# environment:
# - JAVA_OPTS=-Xmx1g
# volumes:
# - ./secrets/tomcat/tomcat-users.xml:/usr/local/tomcat/conf/tomcat-users.xml
# - ./secrets/tomcat/webapps:/usr/local/tomcat/webapps
# - ./secrets/tomcat/chemaxon/licenses:/home/tomcat/.chemaxon/licenses
# pisces-db:
# restart: unless-stopped
# image: mdillon/postgis
# expose:
# - "5432"
# volumes:
# - /var/www/pisces:/docker-entrypoint-initdb.d
# Cyanweb Flask API
# cyan-api:
# restart: unless-stopped
# build:
# context: ./EPA-Cyano-Web
# dockerfile: docker/flask/Dockerfile
# expose:
# - "5001"
# depends_on:
# - cyan-db
# volumes:
# - ./EPA-Cyano-Web/config:/config
# environment:
# # Does environment overwrite env_file, or vice versa?
# - DOCKER_HOSTNAME=${HOSTNAME}
# links:
# - cyan-db
# env_file:
# # Would set_enviornment.py overwrite env vars in default below (hope so).
# - ${CYAN_CONFIG:-./EPA-Cyano-Web/config/environments/local_docker_dev.env}
# Cyanweb Celery Worker
# cyan-celery:
# restart: unless-stopped
# build:
# context: ./EPA-Cyano-Web
# dockerfile: docker/flask/Dockerfile
# image: cyan-celery
# container_name: cyan-celery
# command: celery -A celery_worker.celery worker --loglevel=INFO -c 1
# depends_on:
# - cyan-db
# - redis
# volumes:
# - ./EPA-Cyano-Web/config:/config
# - ./EPA-Cyano-Web/cyan_flask/:/cyan_flask
# environment:
# - DOCKER_HOSTNAME=${HOSTNAME}
# env_file:
# - ${CYAN_CONFIG:-./EPA-Cyano-Web/config/environments/local_docker_dev.env}
# Cyanweb MySQL DB
# cyan-db:
# restart: unless-stopped
# build:
# context: ./EPA-Cyano-Web
# dockerfile: docker/mysql/Dockerfile
# volumes:
# # NOTE: Optional volume for existing DB dump, defaults to blank dummy file if no dump
# - ${SQL_DUMP:-./EPA-Cyano-Web/cyan_mysql/no_dump.txt}:/tmp/dump.sql # use optional dump file to build container DB
# - /var/www/app_data/cyano:/var/lib/mysql
# environment:
# - MYSQL_RANDOM_ROOT_PASSWORD=yes
# env_file:
# - ${CYAN_CONFIG:-./EPA-Cyano-Web/config/environments/local_docker_dev.env}