-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
281 lines (259 loc) · 7.76 KB
/
docker-compose.yaml
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
services:
minio:
image: minio/minio:RELEASE.2025-01-20T14-49-07Z
ports:
- 9100:9000
- 9101:9001
environment:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: miniotest
command: server --console-address ":9001" /data
healthcheck:
test: curl http://minio:9000/minio/health/live
interval: 5s
timeout: 5s
retries: 10
start_period: 2s
createbucket:
image: minio/mc:RELEASE.2025-01-17T23-25-50Z
depends_on:
minio:
condition: service_healthy
entrypoint: >
/bin/sh -c "
/usr/bin/mc config host add myminio http://minio:9000 minio miniotest;
/usr/bin/mc mb myminio/epp;
/usr/bin/mc mb myminio/meca;
exit 0;
"
loadbucket:
image: minio/mc:RELEASE.2025-01-17T23-25-50Z
depends_on:
createbucket:
condition: service_completed_successfully
entrypoint: >
/bin/sh -c "
/usr/bin/mc config host add myminio http://minio:9000 minio miniotest;
/usr/bin/mc cp --recursive /mock-meca/* myminio/meca/;
exit 0;
"
volumes:
- ./mock-data/meca:/mock-meca
temporal-db:
image: percona/percona-server:8.0.34-26.1-multi
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: testmysql
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
start_period: 2s
interval: 5s
timeout: 5s
retries: 10
temporal:
image: temporalio/auto-setup:1.26.2
ports:
- 7233:7233
environment:
DB: mysql8
MYSQL_SEEDS: temporal-db
MYSQL_USER: root
MYSQL_PWD: testmysql
DBNAME: temporal
VISIBILITY_DBNAME: "temporalvisibility"
DEFAULT_NAMESPACE: default
DEFAULT_NAMESPACE_RETENTION: 72h
SKIP_ADD_CUSTOM_SEARCH_ATTRIBUTES: true
TEMPORAL_ADDRESS: temporal:7233
healthcheck:
test: temporal operator namespace describe default
interval: 5s
timeout: 5s
retries: 10
start_period: 2s
depends_on:
temporal-db:
condition: service_healthy
temporal-setup-search:
image: temporalio/admin-tools:1.23.1.0
environment:
TEMPORAL_ADDRESS: temporal:7233
entrypoint: bash -c 'temporal operator search-attribute create --name ManuscriptId --type Text && temporal operator search-attribute create --name DocmapURL --type Text'
depends_on:
temporal:
condition: service_healthy
temporal-ui:
image: temporalio/ui:2.34.0
ports:
- 8233:8233
environment:
TEMPORAL_ADDRESS: temporal:7233
TEMPORAL_UI_PORT: 8233
healthcheck:
test: curl http://localhost:8233 -I
depends_on:
temporal:
condition: service_healthy
mongodb:
image: mongo:7.0.16
environment:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: testtest
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh mongodb:27017/test -u admin -p testtest --authenticationDatabase admin --quiet
interval: 5s
timeout: 5s
retries: 10
start_period: 2s
api:
image: ghcr.io/elifesciences/enhanced-preprints-server:master-4bd505fa-20250130.0041
healthcheck:
test: sh -c 'apk add curl; curl http://localhost:3000/'
interval: 5s
timeout: 5s
retries: 10
start_period: 2s
depends_on:
mongodb:
condition: service_healthy
environment:
REPO_TYPE: MongoDB
REPO_CONNECTION: mongodb:27017
REPO_USERNAME: admin
REPO_PASSWORD: testtest
ELIFE_METRICS_URL: http://wiremock:8080
ports:
- 3000:3000
client:
image: ghcr.io/elifesciences/enhanced-preprints-client:master-e0ade128-20250130.1211
healthcheck:
test: sh -c 'apk add curl; curl -X POST http://client:3000/'
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
environment:
NEXT_PUBLIC_SITE_NAME: ${NEXT_PUBLIC_SITE_NAME:-elife}
API_SERVER: http://api:3000
NEXT_PUBLIC_IMAGE_SERVER: /iiif
IS_AUTOMATED: true
NEXT_PUBLIC_GTM_ID: notarealid
depends_on:
api:
condition: service_healthy
ports:
- 3001:3000
xslt:
image: ghcr.io/elifesciences/enhanced-preprints-biorxiv-xslt-api:master-29c91bd9-20250128.1354
restart: always
ports:
- 3004:80
healthcheck:
test: "curl -H 'X-Passthrough: true' -f http://localhost:80/ -d '<test></test>' || exit 1"
interval: 30s
timeout: 30s
retries: 3
start_period: 5s
encoda:
image: ghcr.io/elifesciences/enhanced-preprints-encoda:master-da08f0ec-20250113.1939
healthcheck:
test: "wget --post-data '<test></test>' -O - http://localhost:3000/"
interval: 10s
timeout: 5s
retries: 3
start_period: 3s
restart: always
ports:
- 3005:3000
worker: &worker-config
image: ghcr.io/elifesciences/enhanced-preprints-import-worker:master-ad8c6b0e-20250130.0035
depends_on:
createbucket:
condition: service_completed_successfully
loadbucket:
condition: service_completed_successfully
temporal:
condition: service_healthy
temporal-setup-search:
condition: service_completed_successfully
xslt:
condition: service_healthy
encoda:
condition: service_healthy
api:
condition: service_healthy
environment: &worker-env
EPP_SERVER_URI: http://api:3000
TEMPORAL_SERVER: temporal:7233
TEMPORAL_TASK_QUEUE: epp
# EPP S3 bucket
S3_ENDPOINT: http://minio:9000
AWS_ACCESS_KEY_ID: minio
AWS_SECRET_ACCESS_KEY: miniotest
BUCKET_NAME: epp
# Meca S3 Bucket (on minio)
MECA_S3_ENDPOINT: http://minio:9000
MECA_AWS_ACCESS_KEY_ID: minio
MECA_AWS_SECRET_ACCESS_KEY: miniotest
# control concurrency
TEMPORAL_MAX_CONCURRENT_ACTIVITY_TASK_EXECUTIONS: "25"
TEMPORAL_MAX_CONCURRENT_WORKFLOW_TASK_EXECUTIONS: "5"
TEMPORAL_MAX_CACHED_WORKFLOWS: "5"
# Other services
XSLT_TRANSFORM_ADDRESS: http://wiremock:8080/xslt-transform
ENCODA_TRANSFORM_ADDRESS: http://encoda:3000
restart: on-failure:5
command:
- yarn
- start:worker
healthcheck: &worker-healthcheck
test: curl -s http://localhost:9464/metrics | grep 'temporal_worker_start{namespace="default",service_name="temporal-core-sdk",task_queue="epp"}' | grep 1
interval: 5s
timeout: 5s
retries: 10
start_period: 2s
worker-import-docmaps:
<<: *worker-config
environment:
<<: *worker-env
TEMPORAL_TASK_QUEUE: import-docmaps
healthcheck:
<<: *worker-healthcheck
test: curl -s http://localhost:9464/metrics | grep 'temporal_worker_start{namespace="default",service_name="temporal-core-sdk",task_queue="import-docmaps"}' | grep 1
import-controller:
image: ghcr.io/elifesciences/enhanced-preprints-import-controller:master-144fb3b0-20241218.2054
ports:
- 3006:5000
depends_on:
worker:
condition: service_healthy
worker-import-docmaps:
condition: service_healthy
environment:
TEMPORAL_NAMESPACE: default
TEMPORAL_UI: http://localhost:8233
TEMPORAL_SERVER: temporal:7233
TEMPORAL_TASK_QUEUE: epp
healthcheck:
test: sh -c 'apk add curl; curl -X GET http://import-controller:5000/ping | grep pong'
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
restart: always
wiremock:
image: wiremock/wiremock:3.10.0-1
ports:
- 8080:8080
healthcheck:
test: curl http://wiremock:8080/__admin/health
interval: 5s
timeout: 5s
retries: 10
start_period: 30s
command:
--local-response-templating
volumes:
- ./wiremock/mappings:/home/wiremock/mappings
- ./mock-data/docmaps:/home/wiremock/__files/docmaps