-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·286 lines (268 loc) · 7.96 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
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
version: '2.1'
volumes:
collected_static:
services:
# QED Django front-end
qed_django:
restart: unless-stopped
image: dbsmith88/qed_django:dev # use qed image w/ tag = VERSION, default = latest
expose:
- "8080"
volumes:
- collected_static:/src/collected_static
- .:/src
- /var/www/app_data:/src/app-data
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}
- HMS_RELEASE=${HMS_RELASE:-0}
- IN_PROD=${IN_PROD:-0}
- HMS_AQUATOX_WEBAPP=${HMS_AQUATOX_WEBAPP:-False}
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: quanted/cts_nodejs
image: ghcr.io/quanted/cts-nodejs:dev
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: quanted/cts_celery
image: ghcr.io/quanted/cts-celery:dev
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: quanted/cts_celery
image: ghcr.io/quanted/cts-celery:dev
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: ./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:qed_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 # 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=${HOSTNAME}
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"
# 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
- /var/www/app_data/hms:/src/hms-data
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=${HOSTNAME}
- DASK_SCHEDULER=dask_scheduler:8786
logging:
options:
max-size: "200k"
max-file: "10"
hms_dotnetcore:
restart: unless-stopped
image: ghcr.io/quanted/hms:dev
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"
- /var/www/app_data/hms:/app/App_Data
# Dask Containers
dask_scheduler:
restart: unless-stopped
image: dbsmith88/qed-dask:dev-np
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
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:8080/"
HMS_WORKFLOW_BACKEND: "https://ceamstg.ceeopdev.net/hms/rest/"
HMS_BACKEND: "http://hms_dotnetcore:8080/"
volumes:
- "../qed:/src/qed"
# CTSWS Apache Tomcat container
ctsws:
restart: unless-stopped
image: ${CTSWS_IMAGE:-ghcr.io/quanted/ctsws:docker-28b9ed15dc6f4724f56c71c1c5f77a246e70a5e4}
expose:
- "8080"
# ports:
# - "8087:8080"
environment:
- JAVA_OPTS=-Xmx1g
- LOG4J_FORMAT_MSG_NO_LOOKUPS=true
- CTSWS_SERVER_USERNAME=${CTSWS_SERVER_USERNAME}
- CTSWS_SERVER_PASSWORD=${CTSWS_SERVER_PASSWORD}
volumes:
- ./secrets/tomcat/chemaxon/licenses/license.cxl:/root/.chemaxon/licenses/license.cxl
# Jchem Webservices (legacy)
jchemws:
restart: unless-stopped
image: ${JCHEMWS_IMAGE:-ghcr.io/quanted/jchemws:main-6ae2e9561c201bb83350c8091171ed74ae9f4ed0}
expose:
- "8080"
# ports:
# - "8086:8080"
environment:
- JAVA_OPTS=-Xmx1500m -Djava.awt.headless=true
- LOG4J_FORMAT_MSG_NO_LOOKUPS=true
volumes:
- ./secrets/tomcat/chemaxon/licenses/license.cxl:/home/tomcat/.chemaxon/licenses/license.cxl
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
image: ghcr.io/usepa/cyanweb-api:dev
expose:
- "5001"
depends_on:
- cyan-db
volumes:
- ./EPA-Cyano-Web/config/secrets:/config/secrets
environment:
- DOCKER_HOSTNAME=${HOSTNAME}
links:
- cyan-db
env_file:
- ${CYAN_CONFIG:-./EPA-Cyano-Web/config/.env}
# Cyanweb Celery Worker
cyan-celery:
restart: unless-stopped
image: ghcr.io/usepa/cyanweb-api:dev
command: celery -A celery_worker.celery worker --loglevel=INFO -c 1
depends_on:
- cyan-db
- redis
volumes:
- ./EPA-Cyano-Web/config/secrets:/config/secrets
environment:
- DOCKER_HOSTNAME=${HOSTNAME}
env_file:
- ${CYAN_CONFIG:-./EPA-Cyano-Web/config/.env}
# Cyanweb MySQL DB
cyan-db:
restart: unless-stopped
image: ghcr.io/usepa/cyanweb-db:dev
volumes:
- /var/www/app_data/cyano:/var/lib/mysql
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=yes
env_file:
- ${CYAN_CONFIG:-./EPA-Cyano-Web/config/.env}