diff --git a/ccp/modules/dashboard-compose.yml b/ccp/modules/dashboard-compose.yml new file mode 100644 index 0000000..43b109d --- /dev/null +++ b/ccp/modules/dashboard-compose.yml @@ -0,0 +1,28 @@ +version: "3.7" + +services: + fhir2sql: + depends_on: + - "dashboard-db" + image: docker.verbis.dkfz.de/cache/samply/fhir2sql:latest + container_name: bridgehead-ccp-dashboard-fhir2sql + environment: + BLAZE_BASE_URL: "http://blaze:8080/fhir/" + PG_HOST: "dashboard-db" + PG_PORT: 5432 + PG_USERNAME: "dashboard" + PG_PASSWORD: "${DASHBOARD_DB_PASSWORD}" # Set in exporter-setup.sh + PG_DBNAME: "dashboard" + # TODO: Remove the following, replace with defaults in app + BLAZE_PAGE_RESOURCE_COUNT: 10000 + PG_BATCH_SIZE: 10000 + + dashboard-db: + image: docker.verbis.dkfz.de/cache/postgres:${POSTGRES_TAG} + container_name: bridgehead-ccp-dashboard-db + environment: + POSTGRES_USER: "dashboard" + POSTGRES_PASSWORD: "${DASHBOARD_DB_PASSWORD}" # Set in exporter-setup.sh + POSTGRES_DB: "dashboard" + volumes: + - "/var/cache/bridgehead/ccp/dashboard-db:/var/lib/postgresql/data" diff --git a/ccp/modules/dashboard-setup.sh b/ccp/modules/dashboard-setup.sh new file mode 100644 index 0000000..aee79fa --- /dev/null +++ b/ccp/modules/dashboard-setup.sh @@ -0,0 +1,7 @@ +#!/bin/bash -e + +if [ "$ENABLE_DASHBOARD" == true ]; then + log INFO "Dashboard setup detected -- will start Dashboard backend and FHIR2SQL service." + OVERRIDE+=" -f ./$PROJECT/modules/dashboard-compose.yml" + DASHBOARD_DB_PASSWORD="$(echo \"This is a salt string to generate one consistent password for the Dashboard database. It is not required to be secret.\" | sha1sum | openssl pkeyutl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)" +fi diff --git a/ccp/modules/dashboard.md b/ccp/modules/dashboard.md new file mode 100644 index 0000000..ed00305 --- /dev/null +++ b/ccp/modules/dashboard.md @@ -0,0 +1 @@ +# TODO David Scholz