Add missing switch-case for gbn

This commit is contained in:
Martin Lablans 2024-01-08 15:49:28 +01:00
parent 2074461ee7
commit 00cae67fa1
1 changed files with 16 additions and 7 deletions

View File

@ -4,13 +4,22 @@ if [ "${ENABLE_GBN}" == "true" ]; then
log INFO "GBN setup detected -- will start services for German Biobank Node."
OVERRIDE+=" -f ./$PROJECT/modules/gbn-compose.yml"
# Set required variables
GBN_BROKER_ID=broker.bbmri.de
GBN_ROOT_CERT=gbn
if [ "{$ENABLE_TEST}" == "true" ]; then
GBN_BROKER_ID=broker-test.bbmri.de
GBN_ROOT_CERT=gbn.test
fi
# The environment needs to be defined in /etc/bridgehead
case "$ENVIRONMENT" in
"production")
ERIC_BROKER_ID=broker.bbmri.samply.de
ERIC_ROOT_CERT=eric
;;
"test")
ERIC_BROKER_ID=broker-test.bbmri-test.samply.de
ERIC_ROOT_CERT=eric.test
;;
*)
report_error 6 "Environment \"$ENVIRONMENT\" is unknown. Assuming production. FIX THIS!"
ERIC_BROKER_ID=broker.bbmri.samply.de
ERIC_ROOT_CERT=eric
;;
esac
GBN_BROKER_URL=https://${GBN_BROKER_ID}
GBN_PROXY_ID=${SITE_ID}.${GBN_BROKER_ID}