2024-03-15 09:35:49 +01:00
|
|
|
version: "3.7"
|
|
|
|
|
|
|
|
services:
|
|
|
|
focus-ehds2:
|
|
|
|
#image: docker.verbis.dkfz.de/cache/samply/focus:${FOCUS_TAG}
|
|
|
|
image: samply/focus
|
|
|
|
container_name: bridgehead-focus-ehds2
|
|
|
|
environment:
|
|
|
|
API_KEY: ${EHDS2_FOCUS_BEAM_SECRET_SHORT}
|
|
|
|
BEAM_APP_ID_LONG: focus.${EHDS2_PROXY_ID}
|
|
|
|
PROXY_ID: ${EHDS2_PROXY_ID}
|
|
|
|
BLAZE_URL: "http://blaze:8080/fhir/"
|
|
|
|
BEAM_PROXY_URL: http://beam-proxy-ehds2:8081
|
|
|
|
RETRY_COUNT: ${FOCUS_RETRY_COUNT}
|
2024-03-28 11:06:10 +01:00
|
|
|
OBFUSCATE: "no"
|
2024-03-15 09:35:49 +01:00
|
|
|
depends_on:
|
|
|
|
- "beam-proxy-ehds2"
|
|
|
|
- "blaze"
|
|
|
|
|
|
|
|
beam-proxy-ehds2:
|
|
|
|
image: docker.verbis.dkfz.de/cache/samply/beam-proxy:develop
|
|
|
|
container_name: bridgehead-beam-proxy-ehds2
|
|
|
|
environment:
|
|
|
|
BROKER_URL: ${EHDS2_BROKER_URL}
|
|
|
|
PROXY_ID: ${EHDS2_PROXY_ID}
|
|
|
|
APP_focus_KEY: ${EHDS2_FOCUS_BEAM_SECRET_SHORT}
|
|
|
|
PRIVKEY_FILE: /run/secrets/proxy.pem
|
|
|
|
ALL_PROXY: http://forward_proxy:3128
|
|
|
|
TLS_CA_CERTIFICATES_DIR: /conf/trusted-ca-certs
|
|
|
|
ROOTCERT_FILE: /conf/root.crt.pem
|
|
|
|
secrets:
|
|
|
|
- proxy.pem
|
|
|
|
depends_on:
|
|
|
|
- "forward_proxy"
|
|
|
|
volumes:
|
|
|
|
- /etc/bridgehead/trusted-ca-certs:/conf/trusted-ca-certs:ro
|
|
|
|
- /srv/docker/bridgehead/bbmri/modules/${EHDS2_ROOT_CERT}.root.crt.pem:/conf/root.crt.pem:ro
|
|
|
|
|
|
|
|
# Convert ECDC CSV file into FHIR and push to Blaze
|
|
|
|
transfair:
|
|
|
|
container_name: transfair
|
|
|
|
image: samply/transfair
|
|
|
|
environment:
|
|
|
|
FHIR_INPUT_URL: "http://source_blaze:8080/fhir"
|
|
|
|
FHIR_OUTPUT_URL: "http://bridgehead-bbmri-blaze:8080/fhir"
|
|
|
|
PROFILE: "amr2fhir"
|
|
|
|
#WRITE_BUNDLES_TO_FILE: "true"
|
|
|
|
AMR_FILE_PATH: "/app/data"
|
|
|
|
restart: on-failure
|
2024-03-26 17:00:42 +01:00
|
|
|
# The start up logic for TransFAIR is kind of complicated for the ECDC/EHDS2
|
|
|
|
# pilot. This is because we only want to run it if 1. there are source data
|
|
|
|
# files to be transformed and 2. if there is no lock file. We also need to
|
|
|
|
# wait for Blaze to start, TransFAIR does not check for this. And finally,
|
|
|
|
# once TransFAIR has finished loading data, a lock file is created, to stop
|
|
|
|
# a time-consuming repeat run.
|
|
|
|
command: bash -c " \
|
|
|
|
echo listing /app/data && \
|
|
|
|
ls -la /app/data && \
|
2024-06-07 16:08:16 +02:00
|
|
|
ls /app/data/*.[cC][sS][vV] 1> /dev/null 2>&1 && \
|
2024-03-26 17:00:42 +01:00
|
|
|
[ ! -f /app/data/lock ] && \
|
|
|
|
( \
|
|
|
|
echo 'Wait for Blaze to finish initializing' ; \
|
2024-07-16 16:55:08 +02:00
|
|
|
sleep 360 ; \
|
2024-03-26 17:00:42 +01:00
|
|
|
echo 'Remove old output files' ; \
|
|
|
|
rm -rf /app/test/* ; \
|
|
|
|
cd /app ; \
|
|
|
|
echo 'Run TransFAIR' ; \
|
|
|
|
java -jar transFAIR.jar ; \
|
|
|
|
echo 'Touching lock file' ; \
|
|
|
|
touch /app/data/lock \
|
|
|
|
) & tail -f /dev/null"
|
|
|
|
# If you put .csv files into ./../ecdc/data, TransFAIR will try to process them.
|
2024-03-15 09:35:49 +01:00
|
|
|
volumes:
|
2024-03-18 11:03:50 +01:00
|
|
|
- ../../ecdc/test:/app/test/
|
|
|
|
- ../../ecdc/data:/app/data/
|
2024-03-15 09:35:49 +01:00
|
|
|
|
|
|
|
# Report on the data pushed to Blaze by TransFAIR
|
2024-03-20 11:43:43 +01:00
|
|
|
test-data-loader:
|
|
|
|
container_name: test-data-loader
|
|
|
|
image: samply/test-data-loader
|
2024-07-16 16:55:08 +02:00
|
|
|
command: sh -c "sleep 420 && echo Listing all resources in FHIR store && blazectl --server http://bridgehead-bbmri-blaze:8080/fhir count-resources && tail -f /dev/null"
|
2024-03-15 09:35:49 +01:00
|
|
|
|