-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yaml
136 lines (127 loc) · 3.31 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
version: '3.4'
services:
# Dependant services
## Image Server
image-server:
image: ghcr.io/elifesciences/epp-image-server:master-9797adfc-20240617.1602
depends_on:
createbucket:
condition: service_completed_successfully
environment:
- SOURCE_STATIC=S3Source
- S3SOURCE_ENDPOINT=http://minio:9000/
- S3SOURCE_ACCESS_KEY_ID=minio
- S3SOURCE_SECRET_KEY=miniotest
- S3SOURCE_BASICLOOKUPSTRATEGY_PATH_PREFIX=automation/
- S3SOURCE_BASICLOOKUPSTRATEGY_BUCKET_NAME=eppdata
ports:
- "8182:8182"
volumes:
- ./data:/opt/epp/data
healthcheck:
test: curl http://image-server:8182/
interval: 5s
timeout: 5s
retries: 10
start_period: 2s
## Minio
minio:
image: minio/minio:RELEASE.2023-01-02T09-40-09Z
healthcheck:
test: curl http://minio:9000/minio/health/live
interval: 5s
timeout: 5s
retries: 10
start_period: 2s
ports:
- "9100:9000"
- "9101:9001"
volumes:
- minio_storage:/data
environment:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: miniotest
command: server --console-address ":9001" /data
# Create bucket and upload data
createbucket:
image: minio/mc:RELEASE.2022-12-24T15-21-38Z
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/eppdata || true;
/usr/bin/mc mirror /automation-data myminio/eppdata/automation;
exit 0;
"
volumes:
- ./data/automation:/automation-data
## EPP server mock
wiremock:
image: wiremock/wiremock:3.9.2-1
ports:
- 3000:3000
healthcheck:
test: curl http://wiremock:3000/__admin/health
interval: 5s
timeout: 5s
retries: 10
start_period: 30s
command:
- --local-response-templating
- --port
- "3000"
volumes:
- ./wiremock/mappings:/home/wiremock/mappings
- ./wiremock/files:/home/wiremock/__files
## Main app server
yarn:
build:
context: .
target: dev
command: yarn
volumes:
- ./:/opt/epp-client/
- node_modules:/opt/epp-client/node_modules
app:
build:
context: .
target: dev
healthcheck:
test: ["CMD-SHELL", "sh -c 'apk add curl; curl -X POST http://app:3000/api/ping'"]
interval: 5s
timeout: 5s
retries: 10
start_period: 2s
environment:
NEXT_PUBLIC_SITE_NAME: ${NEXT_PUBLIC_SITE_NAME:-elife}
API_SERVER: ${API_SERVER:-http://wiremock:3000}
IIIF_SERVER: ${IIIF_SERVER:-http://image-server:8182/iiif}
NEXT_PUBLIC_IMAGE_SERVER: /iiif
NEXT_PUBLIC_DISABLE_TERMS: ${NEXT_PUBLIC_DISABLE_TERMS:-false}
depends_on:
yarn:
condition: service_completed_successfully
ports:
- 3001:3000
- 9229:9229
volumes:
- ./:/opt/epp-client/
- node_modules:/opt/epp-client/node_modules
# Expose API and client via proxy
nginx:
image: nginx:latest
depends_on:
wiremock:
condition: service_healthy
app:
condition: service_healthy
ports:
- 8080:80
volumes:
- ./.docker/nginx.conf:/etc/nginx/conf.d/default.conf
volumes:
data:
node_modules:
minio_storage: