Uniform dktk and c4 docker-compose files

This commit is contained in:
root 2022-01-11 14:40:16 +01:00
parent 1649d0b624
commit 42d69cef4e
4 changed files with 22 additions and 29 deletions

View File

@ -61,7 +61,7 @@ services:
- "connector-db"
connector_db:
container_name: bridgehead_connector_db
container_name: bridgehead_c4_connector_db
image: postgres:10.17
environment:
POSTGRES_HOST: ${CONNECTOR_DB_HOST}
@ -79,7 +79,7 @@ services:
idmanager:
container_name: bridgehead-idmanager
container_name: bridgehead_c4_idmanager
image: docker.verbis.dkfz.de/pseudonymisierung/magicpl:0.2.0-RC23
environment:
MAGICPL_MAINZELLISTE_URL: ${MAGICPL_MAINZELLISTE_URL}
@ -111,7 +111,7 @@ services:
- "samply"
patientlist:
container_name: bridgehead-patientlist
container_name: bridgehead_c4_patientlist
image: medicalinformatics/mainzelliste:develop
environment:
ML_DB_DRIVER: org.postgresql.Driver
@ -140,7 +140,7 @@ services:
- "samply"
patientlist_db:
container_name: bridgehead_patientlist_db
container_name: bridgehead_c4_patientlist_db
image: postgres:13.1-alpine
environment:
POSTGRES_DB: ${ML_DB_NAME}
@ -153,7 +153,7 @@ services:
- "samply"
store:
container_name: bridgeheadstore
container_name: bridgehead_c4_store
image: docker.verbis.dkfz.de/ccp/samply.store:release-5.1.2
environment:
MDR_URL: ${CCP_MDR_URL}
@ -176,7 +176,7 @@ services:
- "samply"
store_db:
container_name: bridgehead_store_db
container_name: bridgehead_c4_store_db
image: postgres:9.5-alpine
command: postgres -c datestyle='iso, dmy'
environment:

View File

@ -60,7 +60,7 @@ services:
- "connector-db"
connector_db:
container_name: bridgehead_connector_db
container_name: bridgehead_dktk_connector_db
image: postgres:10.17
environment:
POSTGRES_HOST: ${CONNECTOR_DB_HOST}
@ -76,7 +76,7 @@ services:
idmanager:
container_name: bridgehead-idmanager
container_name: bridgehead_dktk_idmanager
image: docker.verbis.dkfz.de/pseudonymisierung/magicpl:0.2.0-RC23
environment:
MAGICPL_MAINZELLISTE_URL: ${MAGICPL_MAINZELLISTE_URL}
@ -108,7 +108,7 @@ services:
- "samply"
patientlist:
container_name: bridgehead-patientlist
container_name: bridgehead_dktk_patientlist
image: medicalinformatics/mainzelliste:develop
environment:
ML_DB_DRIVER: org.postgresql.Driver
@ -137,7 +137,7 @@ services:
- "samply"
patientlist_db:
container_name: bridgehead_patientlist_db
container_name: bridgehead_dktk_patientlist_db
image: postgres:13.1-alpine
environment:
POSTGRES_DB: ${ML_DB_NAME}

View File

@ -6,32 +6,29 @@ source lib/functions.sh
exitIfNotRoot
if ! ./lib/prerequisites.sh; then
echo "Prerequisites failed, exiting"
log "Prerequisites failed, exiting"
exit 1
fi
source site.conf
_systemd_path=/etc/systemd/system/
echo -e "\nInstalling systemd units ..."
log -e "\nInstalling systemd units ..."
cp -v \
lib/systemd/bridgehead\@.service \
lib/systemd/bridgehead-update\@.service \
lib/systemd/bridgehead-update\@.timer \
$_systemd_path
/etc/systemd/system/
systemctl daemon-reload
echo
if ! systemctl is-active --quiet bridgehead@"${project}"; then
echo "Enabling autostart of bridgehead@${project}.service"
log "Enabling autostart of bridgehead@${project}.service"
systemctl enable bridgehead@"${project}"
echo "Enabling nightly updates for bridgehead@${project}.service ..."
log "Enabling nightly updates for bridgehead@${project}.service ..."
systemctl enable --now bridgehead-update@"${project}".timer
fi
echo -e "\nDone - now start your bridgehead by running\n\tsystemctl start bridgehead@${project}.service\nor by rebooting your machine."
log -e "\nDone - now start your bridgehead by running\n\tsystemctl start bridgehead@${project}.service\nor by rebooting your machine."
# TODO: Configuration of the different modules

View File

@ -3,18 +3,14 @@ service="bridgehead"
source lib/functions.sh
if ! ./prerequisites.sh; then
log "Prerequisites failed, exiting"
exit
fi
log "INFO" "Checking for updates of $service"
# check prerequisites
##TODO: Move to lib/prereq.sh
prerequisites="git docker docker-compose"
for prerequisite in $prerequisites; do
$prerequisite --version 2>&1
is_available=$?
if [ $is_available -gt 0 ]; then
log "ERROR" "Prerequisite not fulfilled - $prerequisite is not available!"
exit 79
fi
done
# check if updates are available
old_git_hash="$(git rev-parse --verify HEAD)"
git fetch 2>&1