-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-template.yaml
282 lines (267 loc) · 9.28 KB
/
docker-template.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
282
services:
gateway:
image: &BASE ${D[org]}/base-service:${D[tag]}
volumes:
- fedora-data:/data
- &SERVICE_ACCOUNT ${GCLOUD_SERVICE_ACCOUNT_MOUNT:-./service-account.json}:/etc/fin/service-account.json
- &DEV_MOUNT_MODELS ./services/base-service/models:/fin/services/models
- &DEV_MOUNT_MODELS_API ./experts-api:/experts-api
ports:
- ${HOST_PORT:-${D[port]}}:3001
environment:
- FIN_URL=${FIN_URL:-${D[host]}}
- HOST_PORT=${HOST_PORT:-${D[port]}}
- CLIENT_ENV=${CLIENT_ENV:-${D[client_env]}}
- OIDC_CLIENT_ID=${OIDC_CLIENT_ID:-${D[oidc_client_id]}}
- OIDC_BASE_URL=${OIDC_BASE_URL:-${D[oidc_base_url]}}
- OIDC_SECRET=${OIDC_SECRET:-${D[oidc_secret]}}
- JWT_SECRET=${JWT_SECRET:-${D[jwt_secret]}}
- JWT_ISSUER=${JWT_ISSUER:-${D[jwt_issuer]}}
- JWT_JWKS_URI=${JWT_JWKS_URI:-${D[jwt_jwks_uri]}}
- FIN_SERVICE_ACCOUNT_NAME=${FIN_SERVICE_ACCOUNT_NAME:-${D[fin_service_account_name]}}
- FIN_SERVICE_ACCOUNT_SECRET=${FIN_SERVICE_ACCOUNT_SECRET:-${D[fin_service_account_secret]}}
depends_on:
- fcrepo
- redis
- elasticsearch
restart: unless-stopped
logging: &LOGGING
driver: "json-file"
options:
max-size: "10m"
max-file: "2"
command: npm run gateway
# command: bash -c 'tail -f /dev/null'
# Fuseki is used to harvest data, and as a check on data as well
fuseki:
image: ${D[org]}/harvest:${D[tag]}
logging: *LOGGING
volumes:
- *SERVICE_ACCOUNT
- fuseki-data:/home/ucd.process
- &DEV_MOUNT_CLIENT ./harvest/experts-client:/usr/local/lib/aggie-experts/experts-client
- &DEV_MOUNT_CLIENT_API ./experts-api:/usr/local/lib/experts-api
ports:
- ${FUSEKI_PORT}:3030
environment:
- JVM_ARGS=${JVM_ARGS:- -Xmx16g -Djena:scripting=true}
- GOOGLE_APPLICATION_CREDENTIALS=/etc/fin/service-account.json
restart: unless-stopped
command: server
# command: noop
###
# Fedora Repository
###
fcrepo:
image: ${D[fin_org]}/fin-fcrepo:${D[fin_tag]}
logging: *LOGGING
ports:
- ${FCREPO_PORT}:8080
# Example for change logging. Note, don't forget to still include the fcrepo.properties file location!
# See: https://wiki.lyrasis.org/display/FEDORA6x/Logging
# environment:
# - CATALINA_OPTS=-Dfcrepo.log.auth=DEBUG
# -Dfcrepo.config.file=/etc/fin/fcrepo.properties
environment:
- GCS=${GCS_BUCKET:-${D[gcs_bucket]}}
- GCS_INIT_DATA_HYDRATION=${GCS_INIT_DATA_HYDRATION:-${D[gcs_init_data_hydration]}}
- CATALINA_OPTS=-Dfcrepo.config.file=/etc/fin/fcrepo.properties -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Xms2G -Xmx6G -XX:+UseG1GC -XX:+DisableExplicitGC
volumes:
- fedora-data:/usr/local/tomcat/fcrepo-home/data
- activemq-data:/usr/local/tomcat/ActiveMQ
- *SERVICE_ACCOUNT
###
# Fedora Postgres Service
###
postgres:
image: ${D[fin_org]}/fin-postgres:${D[fin_tag]}
logging: *LOGGING
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
volumes:
- pg-data:/var/lib/postgresql/data
restart: unless-stopped
init:
image: ${D[org]}/init:${D[tag]}
environment:
- FIN_SERVICE_NAME=init
- OIDC_CLIENT_ID=${OIDC_CLIENT_ID:-${D[oidc_client_id]}}
- OIDC_BASE_URL=${OIDC_BASE_URL:-${D[oidc_base_url]}}
- OIDC_SECRET=${OIDC_SECRET:-${D[oidc_secret]}}
- FIN_SERVICE_ACCOUNT_NAME=${FIN_SERVICE_ACCOUNT_NAME:-${D[fin_service_account_name]}}
- FIN_SERVICE_ACCOUNT_SECRET=${FIN_SERVICE_ACCOUNT_SECRET:-${D[fin_service_account_secret]}}
- GCS=${GCS:-${D[gcs_bucket]}}
- GCS_INIT_DATA_HYDRATION=${GCS_INIT_DATA_HYDRATION:-${D[gcs_init_data_hydration]}}
volumes:
- &DEV_MOUNT_INIT_FCREPO ./services/init/fcrepo-aggie-experts:/etc/ucdlib-service-init/fcrepo-aggie-experts
- *SERVICE_ACCOUNT
redis:
image: redis:3.2
volumes:
- redis-data:/data
restart: unless-stopped
###
# RabbitMQ - for messaging
###
rabbitmq:
image: ${D[fin_org]}/fin-rabbitmq:${D[fin_tag]}
logging: *LOGGING
volumes:
- rabbitmq-data:/var/lib/rabbitmq
spa:
image: *BASE
logging: *LOGGING
volumes:
- *SERVICE_ACCOUNT
- &DEV_MOUNT_SPA ./services/base-service/spa:/fin/services/spa
command: node spa/index.js
environment:
- GA4_ENABLE_STATS=${GA4_ENABLE_STATS:-${D[enable_gaid]}}
- GA4_MEASUREMENT_ID=${GA4_MEASUREMENT_ID:-${D[gaid]}}
- CLIENT_ERROR_REPORTING_URL=${D[client_error_reporting_url]}
- CLIENT_ERROR_REPORTING_KEY=${D[client_error_reporting_key]}
- CLIENT_ERROR_REPORTING_ENABLED=${CLIENT_ERROR_REPORTING_ENABLED:-${D[client_error_reporting_enabled]}}
- FIN_URL=${FIN_URL:-${D[host]}}
- CLIENT_ENV=${CLIENT_ENV:-${D[client_env]}}
- APP_VERSION=${APP_VERSION:-${D[tag]}}
depends_on:
- elasticsearch
restart: unless-stopped
###
# External Database Sync Services
###
dbsync:
image: *BASE
logging: *LOGGING
environment:
- FIN_URL=${FIN_URL:-${D[host]}}
- OIDC_CLIENT_ID=${OIDC_CLIENT_ID:-${D[oidc_client_id]}}
- OIDC_BASE_URL=${OIDC_BASE_URL:-${D[oidc_base_url]}}
- OIDC_SECRET=${OIDC_SECRET:-${D[oidc_secret]}}
- JWT_SECRET=${JWT_SECRET:-${D[jwt_secret]}}
- JWT_ISSUER=${JWT_ISSUER:-${D[jwt_issuer]}}
- JWT_JWKS_URI=${JWT_JWKS_URI:-${D[jwt_jwks_uri]}}
- FIN_SERVICE_ACCOUNT_NAME=${FIN_SERVICE_ACCOUNT_NAME:-${D[fin_service_account_name]}}
- FIN_SERVICE_ACCOUNT_SECRET=${FIN_SERVICE_ACCOUNT_SECRET:-${D[fin_service_account_secret]}}
volumes:
- *SERVICE_ACCOUNT
- *DEV_MOUNT_MODELS
- *DEV_MOUNT_MODELS_API
restart: unless-stopped
command: npm run dbsync
# command: bash -c 'tail -f /dev/null'
# ###
# # GCS - Sccess & Sync
# ###
gcs:
image: *BASE
environment:
- GCS=${GCS_BUCKET:-${D[gcs_bucket]}}
- GCS_INIT_DATA_HYDRATION=${GCS_INIT_DATA_HYDRATION:-${D[gcs_init_data_hydration]}}
- OIDC_CLIENT_ID=${OIDC_CLIENT_ID:-${D[oidc_client_id]}}
- OIDC_BASE_URL=${OIDC_BASE_URL:-${D[oidc_base_url]}}
- OIDC_SECRET=${OIDC_SECRET:-${D[oidc_secret]}}
- JWT_SECRET=${JWT_SECRET:-${D[jwt_secret]}}
- JWT_ISSUER=${JWT_ISSUER:-${D[jwt_issuer]}}
- JWT_JWKS_URI=${JWT_JWKS_URI:-${D[jwt_jwks_uri]}}
- FIN_SERVICE_ACCOUNT_NAME=${FIN_SERVICE_ACCOUNT_NAME:-${D[fin_service_account_name]}}
- FIN_SERVICE_ACCOUNT_SECRET=${FIN_SERVICE_ACCOUNT_SECRET:-${D[fin_service_account_secret]}}
depends_on:
- gateway
volumes:
- *SERVICE_ACCOUNT
command: npm run gcs
# command: bash -c 'tail -f /dev/null'
###
# Search
###
elasticsearch:
image: ${D[fin_org]}/fin-elastic-search:${D[fin_tag]}
logging: *LOGGING
environment:
- node.name=elasticsearch
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms4g -Xmx4g"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- es-data:/usr/share/elasticsearch/data
restart: unless-stopped
depends_on:
- fcrepo
# command: bash -c 'tail -f /dev/null'
kibana:
image: docker.elastic.co/kibana/kibana:8.4.3
logging: *LOGGING
ports:
- ${KIBANA_PORT}:5601
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
- ELASTICSEARCH_URL=http://elasticsearch:9200
- SERVER_BASEPATH=/kibana
- SERVER_REWRITEBASEPATH=true
- xpack.security.enabled=false
- telemetry.enabled=false
depends_on:
- elasticsearch
uber:
image: *BASE
logging: *LOGGING
environment:
- FIN_SERVICE_NAME=uber
- FIN_URL=${FIN_URL:-${D[host]}}
- HOST_PORT=${HOST_PORT:-${D[port]}}
- CLIENT_ENV=${CLIENT_ENV:-${D[client_env]}}
- CDL_PROPAGATE_CHANGES=${CDL_PROPAGATE_CHANGES:-${D[cdl_propagate_changes]}}
- OIDC_CLIENT_ID=${OIDC_CLIENT_ID:-${D[oidc_client_id]}}
- OIDC_BASE_URL=${OIDC_BASE_URL:-${D[oidc_base_url]}}
- OIDC_SECRET=${OIDC_SECRET:-${D[oidc_secret]}}
- JWT_SECRET=${JWT_SECRET:-${D[jwt_secret]}}
- JWT_ISSUER=${JWT_ISSUER:-${D[jwt_issuer]}}
- JWT_JWKS_URI=${JWT_JWKS_URI:-${D[jwt_jwks_uri]}}
- FIN_SERVICE_ACCOUNT_NAME=${FIN_SERVICE_ACCOUNT_NAME:-${D[fin_service_account_name]}}
- FIN_SERVICE_ACCOUNT_SECRET=${FIN_SERVICE_ACCOUNT_SECRET:-${D[fin_service_account_secret]}}
# - OTEL_LOG_LEVEL=DEBUG
- FIN_METRICS_ENABLED=${FIN_METRICS_ENABLED:-true}
- FIN_METRICS_FS_ENABLED=${FIN_METRICS_FS_ENABLED:-true}
- FIN_METRICS_FIN_ENABLED=${FIN_METRICS_FIN_ENABLED:-true}
- FIN_METRICS_FCREPO_ENABLED=${FIN_METRICS_FCREPO_ENABLED:-true}
- FIN_METRICS_EXPORT_GC=${FIN_METRICS_EXPORT_GC:-false}
volumes:
- fs-tests:/fs-tests
- *SERVICE_ACCOUNT
- *DEV_MOUNT_SPA
- *DEV_MOUNT_MODELS
- *DEV_MOUNT_MODELS_API
depends_on:
- elasticsearch
command: npm run uber
# command: bash -c 'tail -f /dev/null'
pg-rest:
image: ${D[fin_org]}/fin-pg-rest:${D[fin_tag]}
logging: *LOGGING
volumes:
- *SERVICE_ACCOUNT
# command: bash -c "tail -f /dev/null"
###
# Docker data volumes
###
volumes:
fs-tests:
driver: local
activemq-data:
driver: local
fuseki-data:
driver: local
fedora-data:
driver: local
pg-data:
driver: local
es-data:
driver: local
redis-data:
driver: local
rabbitmq-data:
driver: local