This repository has been archived by the owner on Nov 21, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
227 lines (225 loc) · 8.21 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
version: '3.4'
services:
jats-ingester_broker:
image: redis:5.0.5-alpine
healthcheck:
test: ["CMD", "redis-cli", "PING"]
jats-ingester_postgres:
image: postgres:11.2
environment:
POSTGRES_DB: airflow-db
volumes:
- data-jats-ingester:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "--username", "postgres"]
interval: 5s
restart: always
jats-ingester_webserver:
image: ${DOCKER_NAMESPACE}/jats-ingester:${REVISION_JATS_INGESTER}
command: sh -c "airflow upgradedb && airflow webserver -p 8080"
volumes:
- .docker/jats-ingester/airflow.cfg:/airflow/airflow.cfg
- .docker/jats-ingester/airflow.cfg:/airflow/.aws/config
environment:
ENVIRONMENT_NAME: ${ENVIRONMENT_NAME}
healthcheck:
test: ["CMD-SHELL", "python ./scripts/airflow_webserver_healthcheck.py"]
restart: always
depends_on:
- jats-ingester_postgres
- jats-ingester_broker
jats-ingester_scheduler:
image: ${DOCKER_NAMESPACE}/jats-ingester:${REVISION_JATS_INGESTER}
command: sh -c "airflow scheduler"
volumes:
- .docker/jats-ingester/airflow.cfg:/airflow/airflow.cfg
- .docker/jats-ingester/airflow.cfg:/airflow/.aws/config
environment:
ENVIRONMENT_NAME: ${ENVIRONMENT_NAME}
restart: always
depends_on:
- jats-ingester_postgres
- jats-ingester_broker
jats-ingester_worker:
image: ${DOCKER_NAMESPACE}/jats-ingester:${REVISION_JATS_INGESTER}
command: sh -c "airflow worker"
volumes:
- .docker/jats-ingester/airflow.cfg:/airflow/airflow.cfg
- .docker/jats-ingester/airflow.cfg:/airflow/.aws/config
environment:
ENVIRONMENT_NAME: ${ENVIRONMENT_NAME}
healthcheck:
test: ["CMD-SHELL", "bash -c 'echo > /dev/tcp/localhost/8793'"]
restart: always
depends_on:
- jats-ingester_postgres
- jats-ingester_broker
dummy-api_fpm:
image: ${DOCKER_NAMESPACE}/dummy-api:${REVISION_DUMMY_API}
volumes:
- ./.docker/api/content_api.yaml:/app/config/packages/content_api.yaml
- ./.docker/api/data:/app/data/
- public-api:/app/public
restart: always
browser_fpm:
image: ${DOCKER_NAMESPACE}/browser:${REVISION_BROWSER}
volumes:
- ./.docker/browser/libero_page.yaml:/app/config/packages/libero_page.yaml
- ./.docker/browser/translations/:/app/translations/
- public-browser:/app/public
environment:
API_URI: http://api-gateway:8081
APP_SECRET:
GTM_ID: ${BROWSER_GTM_ID:-}
INFO_BAR: ${BROWSER_INFO_BAR:-}
restart: always
pattern-library:
image: ${DOCKER_NAMESPACE}/pattern-library:${REVISION_PATTERN_LIBRARY}
restart: always
blog-articles_postgres:
image: postgres:11.2-alpine
volumes:
- data-blog-articles:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "--username", "postgres"]
interval: 5s
restart: always
blog-articles_fpm:
image: ${DOCKER_NAMESPACE}/content-store:${REVISION_CONTENT_STORE}
command: >
sh -c '
while ! nc blog-articles_postgres 5432; do sleep 1; done
bin/console doctrine:migrations:migrate --no-interaction
php-fpm
'
environment:
APP_SECRET:
DEFAULT_LOCALE:
SERVICE_NAME: blog-articles
DATABASE_URL: pgsql://postgres:@blog-articles_postgres:5432/postgres
ASSETS_ORIGIN_WHITELIST: ^https://iiif\.elifesciences\.org/
restart: always
depends_on:
- blog-articles_postgres
blog-articles_web:
image: nginx:1.15.2-alpine
volumes:
- .docker/blog-articles/nginx.conf:/etc/nginx/conf.d/default.conf
healthcheck:
test: ["CMD", "wget", "-O", "/dev/null", "localhost:80/ping"]
interval: 5s
restart: always
depends_on:
- blog-articles_fpm
scholarly-articles_postgres:
image: postgres:11.2-alpine
volumes:
- data-scholarly-articles:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "--username", "postgres"]
interval: 5s
restart: always
scholarly-articles_fpm:
image: ${DOCKER_NAMESPACE}/content-store:${REVISION_CONTENT_STORE}
command: >
sh -c '
while ! nc scholarly-articles_postgres 5432; do sleep 1; done
bin/console doctrine:migrations:migrate --no-interaction
php-fpm
'
environment:
APP_SECRET:
DEFAULT_LOCALE:
SERVICE_NAME: scholarly-articles
DATABASE_URL: pgsql://postgres:@scholarly-articles_postgres:5432/postgres
ASSETS_ORIGIN_WHITELIST: ^(https://prod-elife-published\.s3\.amazonaws.com/|https://${ENVIRONMENT_NAME}-jats-ingester-expanded\.s3\.amazonaws\.com/)
restart: always
depends_on:
- scholarly-articles_postgres
scholarly-articles_web:
image: nginx:1.15.2-alpine
volumes:
- .docker/scholarly-articles/nginx.conf:/etc/nginx/conf.d/default.conf
healthcheck:
test: ["CMD", "wget", "-O", "/dev/null", "localhost:80/ping"]
interval: 5s
restart: always
depends_on:
- scholarly-articles_fpm
search_elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.1.1
volumes:
- .docker/search/log4j2.properties:/usr/share/elasticsearch/config/log4j2.properties
- data-search:/usr/share/elasticsearch/data
- data-search-logs:/usr/share/elasticsearch/logs
environment:
discovery.type: single-node
index.blocks.read_only_allow_delete: null
ES_JAVA_OPTS: -Xmx256m -Xms256m
healthcheck:
test: ["CMD", "curl", "localhost:9200/_cluster/health?wait_for_status=yellow"]
search_wsgi:
image: ${DOCKER_NAMESPACE}/search:${REVISION_SEARCH}
command: uwsgi --ini=uwsgi.ini
volumes:
- .docker/search/uwsgi.ini:/srv/app/uwsgi.ini
- .docker/search/settings.py:/srv/app/search/settings.py
restart: always
depends_on:
- search_elasticsearch
search_web:
image: nginx:1.15.5-alpine
volumes:
- .docker/search/nginx.conf:/etc/nginx/conf.d/default.conf
healthcheck:
test: ["CMD", "wget", "-O", "/dev/null", "localhost:80/ping"]
interval: 5s
restart: always
depends_on:
- search_wsgi
api-gateway:
image: nginx:1.15.2-alpine
volumes:
- .docker/api-gateway-nginx.conf:/etc/nginx/conf.d/default.conf
healthcheck:
test: ["CMD", "wget", "-O", "/dev/null", "localhost:8081/ping"]
interval: 5s
restart: always
depends_on:
- blog-articles_web
- scholarly-articles_web
- search_web
web:
image: nginx:1.15.2-alpine
volumes:
- .docker/web/default.conf:/etc/nginx/conf.d/default.conf
- public-api:/app/api/public
- public-browser:/app/browser/public
- .docker/browser/public:/app/browser/public/assets
ports:
- ${PUBLIC_PORT_HTTP}:80
healthcheck:
test: ["CMD", "nc", "-z", "localhost", "80"]
interval: 5s
restart: always
depends_on:
- api-gateway
- browser_fpm
- dummy-api_fpm
- jats-ingester_webserver
- pattern-library
volumes:
public-api:
public-browser:
data-jats-ingester:
external: true
data-blog-articles:
external: true
data-scholarly-articles:
external: true
data-search:
external: true
data-search-logs:
external: true
data-s3:
external: true