generated from VEuPathDB/example-jaxrs-container-service
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
229 lines (202 loc) · 6.78 KB
/
docker-compose.yml
File metadata and controls
229 lines (202 loc) · 6.78 KB
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
version: "3.5"
services:
# #
# Public facing REST API
# #
service:
image: veupathdb/mblast-http-service:${SERVICE_TAG:-latest}
environment:
AUTH_SECRET_KEY: ${AUTH_SECRET_KEY}
SERVER_PORT: ${SERVER_PORT:-80}
LDAP_SERVER: ${LDAP_SERVER}
ORACLE_BASE_DN: ${ORACLE_BASE_DN}
# Account Database
ACCT_DB_TNS_NAME: ${ACCT_DB_TNS_NAME}
ACCT_DB_USER: ${ACCT_DB_USER}
ACCT_DB_PASS: ${ACCT_DB_PASS}
# User Database
USER_DB_TNS_NAME: ${USER_DB_TNS_NAME}
USER_DB_USER: ${USER_DB_USER}
USER_DB_PASS: ${USER_DB_PASS}
# Queue Connection
QUEUE_HOST: ${QUEUE_HOST:-queue}
# Misc Config
JOB_MOUNT_PATH: ${JOB_MOUNT_PATH:-/out}
DB_MOUNT_PATH: ${DB_MOUNT_PATH:-/db}
DB_BUILD: ${DB_BUILD}
BLAST_HOST: ${BLAST_HOST:-blast}
BLAST_QUEUE_NAME: ${BLAST_QUEUE_NAME:-blast}
BLAST_JOB_CATEGORY: ${BLAST_JOB_CATEGORY:-blast}
# OrthoMCL & DIAMOND
ORTHO_BUILD: ${ORTHO_BUILD:?}
ORTHO_DB_NAME: ${ORTHO_DB_NAME:?}
FORMATTER_HOST: ${FORMATTER_HOST:-formatter}
FORMAT_QUEUE_NAME: ${FORMAT_QUEUE_NAME:-format}
FORMAT_JOB_CATEGORY: ${FORMAT_JOB_CATEGORY:-format}
VALIDATOR_HOST: ${VALIDATOR_HOST:-validator}
# JVM Config
XMX: ${SERVICE_XMX:-256M}
XMS: ${SERVICE_XMS:-64M}
# Job Config
#
# These options configure the validation/management of jobs.
JOB_TIMEOUT: ${JOB_TIMEOUT:-5} #days
MAX_QUERIES_PER_REQUEST: ${MAX_QUERIES_PER_REQUEST:-100}
MAX_RESULTS_PER_QUERY: ${MAX_RESULTS_PER_QUERY:-10000}
MAX_INPUT_QUERY_SIZE: ${MAX_INPUT_QUERY_SIZE:-3145728} # 3MiB
MAX_NA_SEQ_SIZE: ${MAX_NA_SEQ_SIZE:-1048576} # 1MiB
MAX_AA_SEQ_SIZE: ${MAX_AA_SEQ_SIZE:-102400} # 100KiB
volumes:
- type: volume
source: job-data
target: /out
# Replace `source` with the path to the blast db files available in your
# work environment.
- type: bind # volume
source: ${BLAST_DATA:-/tmp/blast-data}
target: /db
read_only: true
labels:
- "com.centurylinklabs.watchtower.enable=${SERVICE_WATCHTOWER:-false}"
- "traefik.http.services.${TRAEFIK_MBLAST_SERVICE_ROUTER:-mblast-dev}.loadbalancer.server.port=80"
- "traefik.http.routers.${TRAEFIK_MBLAST_SERVICE_ROUTER:-mblast-dev}.rule=Host(`${TRAEFIK_MBLAST_SERVICE_HOST:-mblast-dev.local.apidb.org}`)"
- "traefik.http.routers.${TRAEFIK_MBLAST_SERVICE_ROUTER:-mblast-dev}.tls=true"
- "traefik.http.routers.${TRAEFIK_MBLAST_SERVICE_ROUTER:-mblast-dev}.entrypoints=${TRAEFIK_ENTRYPOINTS:-local}"
- "prometheus.scrape_enabled=true"
- "traefik.docker.network=traefik"
depends_on:
- queue
- formatter
restart: 'on-failure:5'
networks:
- traefik
- internal
- monitoring-ext
# #
# Blast Query Runner (Job Queue Managed)
# #
blast:
image: veupathdb/mblast-blast-query:${BLAST_TAG:-latest}
environment:
DB_MOUNT_PATH: /db
JOB_MOUNT_PATH: /out
BLAST_USAGE_REPORT: 'false'
volumes:
- type: volume
source: job-data
target: /out
# Replace `source` with the path to the blast db files available in your
# work environment.
- type: bind # volume
source: ${BLAST_DATA:-/tmp/blast-data}
target: /db
read_only: true
# because the ncbi/blast container is based on gcloud-sdk it creates a
# volume in /root/.confg. We don't care about this, we configure a
# volume so that it is at least tied to the project, instead of a hash.
- type: volume
source: gcloud-config
target: /root/.config
read_only: true
labels:
- "com.centurylinklabs.watchtower.enable=${BLAST_WATCHTOWER:-false}"
- "prometheus.scrape_enabled=true"
networks:
- internal
- external
- monitoring-ext
# #
# Blast Result Formatter
# #
formatter:
image: veupathdb/mblast-blast-formatter:${FORMATTER_TAG:-latest}
environment:
DB_MOUNT_PATH: /db
JOB_MOUNT_PATH: /out
BLAST_USAGE_REPORT: 'false'
volumes:
- type: volume
source: job-data
target: /out
# Replace `source` with the path to the blast db files available in your
# work environment.
- type: bind # volume
source: ${BLAST_DATA:-/tmp/blast-data}
target: /db
read_only: true
# because the ncbi/blast container is based on gcloud-sdk it creates a
# volume in /root/.confg. We don't care about this, we configure a
# volume so that it is at least tied to the project, instead of a hash.
- type: volume
source: gcloud-config
target: /root/.config
read_only: true
labels:
- "com.centurylinklabs.watchtower.enable=${FORMATTER_WATCHTOWER:-false}"
networks:
- internal
- external
# #
# MySQL backing database queue persistence
# #
queue-db:
image: veupathdb/mblast-queue-db:${QUEUE_DB_TAG:-latest}
environment:
# Root user password (IT'S A SECRET TO EVERYBODY)
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:?}
# Service user username
QUEUE_DB_USER: ${QUEUE_DB_USER:-queue}
# Service user password
QUEUE_DB_PASS: ${QUEUE_DB_PASS:?}
volumes:
- type: volume
source: mysql-data
target: /var/lib/mysql
labels:
- "com.centurylinklabs.watchtower.enable=${QUEUE_DB_WATCHTOWER:-false}"
networks:
- internal
# #
# Job Queue
# #
queue:
image: veupathdb/mblast-blast-queue:${QUEUE_TAG:-latest}
environment:
# REQUIRED!
# Specifies a data source name for the job queue and the repository
# database in a form user:password@tcp(mysql_host:mysql_port)/database?options
#
# The password value here must match the `MYSQL_PASSWORD` value for
# the queue-db container.
FIREWORQ_MYSQL_DSN: queue:${QUEUE_DB_PASS}@tcp(queue-db:3306)/queue #${FIREWORQ_MYSQL_DSN} # queue:<some password here>@tcp(queue-db:3306)/queue
# Configures the number of simultaneous blast jobs that can be run
FIREWORQ_QUEUE_DEFAULT_MAX_WORKERS: ${FIREWORQ_QUEUE_DEFAULT_MAX_WORKERS:-5}
FIREWORQ_BIND: ${FIREWORQ_BIND:-0.0.0.0:80}
FIREWORQ_DRIVER: ${FIREWORQ_DRIVER:-mysql}
depends_on:
- queue-db
- blast
- formatter
- validator
networks:
- internal
labels:
- "com.centurylinklabs.watchtower.enable=${QUEUE_WATCHTOWER:-false}"
validator:
image: veupathdb/mblast-blast-validator:${VALIDATOR_TAG:-latest}
networks:
- internal
labels:
- "com.centurylinklabs.watchtower.enable=${VALIDATOR_WATCHTOWER:-false}"
volumes:
job-data:
mysql-data:
gcloud-config:
networks:
external:
internal:
internal: true
traefik:
external: true
monitoring-ext:
external: true