-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
308 lines (287 loc) · 10.6 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
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
version: '2'
services:
biomaj-mongo:
image: mongo:3.2
volumes:
- ${BIOMAJ_DIR}/mongo:/data/db
biomaj-redis:
image: redis
volumes:
- ${BIOMAJ_DIR}/redis:/data
biomaj-elasticsearch:
image: "elasticsearch:2"
command: "elasticsearch -Des.cluster.name='biomaj'"
biomaj-rabbitmq:
image: rabbitmq
hostname: biomaj-rabbitmq
command: rabbitmq-server
entrypoint: ""
volumes:
- ${BIOMAJ_DIR}/rabbitmq:/var/lib/rabbitmq
- ${BIOMAJ_DIR}/biomaj-config/rabbitmq.config:/etc/rabbitmq/rabbitmq.config:ro
environment:
- RABBITMQ_DEFAULT_USER=biomaj
- RABBITMQ_DEFAULT_PASS=biomaj
biomaj-consul:
image: hashicorp/consul:1.17
hostname: consulnode1
ports:
- "8400:8400"
- "8500:8500"
- "8600:53"
command: agent -dev -client 0.0.0.0 -log-level info
biomaj-prometheus:
image: prom/prometheus:v2.45.6
ports:
- "9090:9090"
volumes:
- ${BIOMAJ_DIR}/biomaj-config/prometheus.yml:/etc/prometheus/prometheus.yml
depends_on:
- biomaj-consul
command:
- '--storage.tsdb.retention.time=720h'
- '--config.file=/etc/prometheus/prometheus.yml'
biomaj-influxdb:
image: influxdb
volumes:
- ${BIOMAJ_DIR}/influxdb:/var/lib/influxdb
environment:
- INFLUXDB_DB=biomaj
- INFLUXDB_USER=biomaj
- INFLUXDB_PASSWORD=biomaj
biomaj-public-proxy:
# In production, port 8080 should not be open
image: traefik:1.7
ports:
# - "8080:8080"
- "5000:80"
volumes:
- ${BIOMAJ_DIR}/proxy/traefik/traefik.toml:/etc/traefik/traefik.toml
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- biomaj-consul
biomaj-internal-proxy:
# In production, ports should not be open
image: traefik:1.7
#ports:
# - "8082:8080"
# - "8081:80"
volumes:
- ${BIOMAJ_DIR}/proxy/traefik/traefik-int.toml:/etc/traefik/traefik.toml
depends_on:
- biomaj-consul
biomaj-user-web:
image: quay.io/genouest/biomaj
build:
context: .
volumes:
- ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj/data
environment:
- BIOMAJ_USER_PASSWORD=${BIOMAJ_USER_PASSWORD}
- BIOMAJ_CONFIG=/etc/biomaj/config.yml
- REDIS_PREFIX=biomajuser
- WAIT_HOSTS=biomaj-mongo:27017, biomaj-consul:8500
depends_on:
- biomaj-mongo
- biomaj-consul
- biomaj-redis
command: ["/startup.sh", "gunicorn", "-b", "0.0.0.0:5000", "--log-config", "/etc/biomaj/production.ini biomaj_user.wsgi:app"]
biomaj-download-web:
image: quay.io/genouest/biomaj
build:
context: .
volumes:
- ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj/data
environment:
- BIOMAJ_USER_PASSWORD=${BIOMAJ_USER_PASSWORD}
- BIOMAJ_CONFIG=/etc/biomaj/config.yml
- REDIS_PREFIX=biomajdownload
- WAIT_HOSTS=biomaj-mongo:27017, biomaj-consul:8500
depends_on:
- biomaj-mongo
- biomaj-consul
- biomaj-redis
command: ["/startup.sh", "gunicorn", "-c", "/etc/biomaj/gunicorn_conf.py", "-b", "0.0.0.0:5000", "--log-config", "/etc/biomaj/production.ini biomaj_download.biomaj_download_web:app"]
biomaj-download-message:
image: quay.io/genouest/biomaj
build:
context: .
volumes:
- ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj/data
environment:
- BIOMAJ_USER_PASSWORD=${BIOMAJ_USER_PASSWORD}
- BIOMAJ_CONFIG=/etc/biomaj/config.yml
- REDIS_PREFIX=biomajdownload
- RABBITMQ_USER=biomaj
- RABBITMQ_PASSWORD=biomaj
- WAIT_HOSTS=biomaj-rabbitmq:5672, biomaj-mongo:27017, biomaj-consul:8500
depends_on:
- biomaj-mongo
- biomaj-consul
- biomaj-rabbitmq
- biomaj-redis
command: ["/startup.sh", "biomaj_download_consumer.py"]
biomaj-process-web:
image: quay.io/genouest/biomaj
build:
context: .
volumes:
- ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj/data
- ${BIOMAJ_DIR}/biomaj/process:/opt/conda/envs
environment:
- BIOMAJ_USER_PASSWORD=${BIOMAJ_USER_PASSWORD}
- BIOMAJ_CONFIG=/etc/biomaj/config.yml
- REDIS_PREFIX=biomajprocess
- WAIT_HOSTS=biomaj-mongo:27017, biomaj-consul:8500
depends_on:
- biomaj-mongo
- biomaj-consul
- biomaj-redis
command: ["/startup.sh", "gunicorn", "-c", "/etc/biomaj/gunicorn_conf.py", "-b", "0.0.0.0:5000", "--log-config", "/etc/biomaj/production.ini biomaj_process.biomaj_process_web:app"]
biomaj-process-message:
image: quay.io/genouest/biomaj
build:
context: .
volumes:
- ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj/data
- ${BIOMAJ_DIR}/biomaj/process:/opt/conda/envs
environment:
- BIOMAJ_USER_PASSWORD=${BIOMAJ_USER_PASSWORD}
- BIOMAJ_CONFIG=/etc/biomaj/config.yml
- REDIS_PREFIX=biomajprocess
- RABBITMQ_USER=biomaj
- RABBITMQ_PASSWORD=biomaj
- DOCKER_URL=${DOCKER_URL}
- WAIT_HOSTS=biomaj-rabbitmq:5672, biomaj-mongo:27017, biomaj-consul:8500
depends_on:
- biomaj-mongo
- biomaj-consul
- biomaj-rabbitmq
- biomaj-redis
- biomaj-elasticsearch
command: ["/startup.sh", "biomaj_process_consumer.py"]
biomaj-daemon-web:
image: quay.io/genouest/biomaj
build:
context: .
volumes:
- ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj/data
environment:
- BIOMAJ_USER_PASSWORD=${BIOMAJ_USER_PASSWORD}
- BIOMAJ_CONFIG=/etc/biomaj/config.yml
- REDIS_PREFIX=biomajdaemon
- RABBITMQ_USER=biomaj
- RABBITMQ_PASSWORD=biomaj
- WAIT_HOSTS=biomaj-redis:6379, biomaj-mongo:27017, biomaj-consul:8500
depends_on:
- biomaj-mongo
- biomaj-consul
- biomaj-rabbitmq
- biomaj-redis
- biomaj-influxdb
- biomaj-elasticsearch
- biomaj-user-web
- biomaj-download-web
- biomaj-process-web
command: ["/startup.sh", "gunicorn", "-c", "/etc/biomaj/gunicorn_conf.py", "-b", "0.0.0.0:5000", "--log-config", "/etc/biomaj/production.ini biomaj_daemon.daemon.biomaj_daemon_web:app"]
biomaj-daemon-message:
image: quay.io/genouest/biomaj
build:
context: .
volumes:
- ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj/data
environment:
- BIOMAJ_USER_PASSWORD=${BIOMAJ_USER_PASSWORD}
- BIOMAJ_CONFIG=/etc/biomaj/config.yml
- REDIS_PREFIX=biomajdaemon
- RABBITMQ_USER=biomaj
- RABBITMQ_PASSWORD=biomaj
- WAIT_HOSTS=biomaj-redis:6379, biomaj-mongo:27017, biomaj-consul:8500, biomaj-rabbitmq:5672
depends_on:
- biomaj-mongo
- biomaj-consul
- biomaj-rabbitmq
- biomaj-redis
- biomaj-elasticsearch
- biomaj-user-web
- biomaj-download-web
- biomaj-process-web
command: ["/startup.sh", "biomaj_daemon_consumer.py"]
biomaj-watcher-web:
image: quay.io/genouest/biomaj
build:
context: .
volumes:
- ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj/data
environment:
- BIOMAJ_CONFIG=/etc/biomaj/config.yml
- WAIT_HOSTS=biomaj-redis:6379, biomaj-mongo:27017, biomaj-consul:8500
depends_on:
- biomaj-mongo
- biomaj-consul
- biomaj-user-web
- biomaj-daemon-web
- biomaj-elasticsearch
command: ["/startup.sh", "gunicorn", "-c", "/etc/biomaj/gunicorn_conf.py", "-b", "0.0.0.0:5000", "--log-config", "/etc/biomaj/production.ini --paste /etc/biomaj/production.ini biomajwatcher.biomajwatcher:main"]
biomaj-cron:
image: quay.io/genouest/biomaj-cron
volumes:
- ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj/data
environment:
- BIOMAJ_CONFIG=/etc/biomaj/config.yml
depends_on:
- biomaj-daemon-web
biomaj-ftp:
image: quay.io/genouest/biomaj
build:
context: .
volumes:
- ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj/data
environment:
- BIOMAJ_USER_PASSWORD=${BIOMAJ_USER_PASSWORD}
- BIOMAJ_CONFIG=/etc/biomaj/config.yml
- REDIS_PREFIX=biomajftp
- RABBITMQ_USER=biomaj
- RABBITMQ_PASSWORD=biomaj
- MASQUERADE_ADDRESS=${MASQUERADE_ADDRESS}
- WAIT_HOSTS=biomaj-mongo:27017, biomaj-consul:8500
depends_on:
- biomaj-mongo
- biomaj-consul
- biomaj-user-web
- biomaj-elasticsearch
ports:
- "2121:21"
command: ["/startup.sh", "biomaj_ftp_service.py"]
biomaj-release-web:
image: quay.io/genouest/biomaj
build:
context: .
volumes:
- ${BIOMAJ_DIR}/biomaj:/var/lib/biomaj/data
environment:
- BIOMAJ_CONFIG=/etc/biomaj/config.yml
- REDIS_PREFIX=biomajrelease
- REDIS_DAEMON_PREFIX=biomajdaemon
- WAIT_HOSTS=biomaj-redis:6379, biomaj-mongo:27017, biomaj-consul:8500
depends_on:
- biomaj-consul
- biomaj-redis
- biomaj-daemon-web
- biomaj-daemon-message
command: ["/startup.sh", "biomaj_release.py"]
biomaj-expose:
image: quay.io/genouest/biomaj-expose
labels:
- traefik.enable=true
- traefik.frontend.rule=PathPrefix:/db
- traefik.frontend.auth.forward.address=http://biomaj-daemon-web:5000/api/daemon/expose
- traefik.frontend.auth.forward.trustForwardHeader=true
depends_on:
- biomaj-internal-proxy
build:
context: proxy/nginx
volumes:
- ./proxy/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
- ${BIOMAJ_DIR}/biomaj/db:/db:ro
command: [nginx-debug, '-g', 'daemon off;']