bridgehead/bbmri/modules/ehds2-compose.yml

83 lines
3.1 KiB
YAML

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}
OBFUSCATE: "no"
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
# 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 && \
ls /app/data/*.[cC][sS][vV] 1> /dev/null 2>&1 && \
[ ! -f /app/data/lock ] && \
( \
echo 'Wait for Blaze to finish initializing' ; \
sleep 300 ; \
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.
volumes:
- ../../ecdc/test:/app/test/
- ../../ecdc/data:/app/data/
# Report on the data pushed to Blaze by TransFAIR
test-data-loader:
container_name: test-data-loader
image: samply/test-data-loader
command: sh -c "sleep 400 && echo Listing all resources in FHIR store && blazectl --server http://bridgehead-bbmri-blaze:8080/fhir count-resources && tail -f /dev/null"