Make directory sync opt service

This commit is contained in:
Patrick Skowronek 2023-03-31 08:04:28 +02:00
parent bedad57f41
commit df74d6d768
4 changed files with 20 additions and 8 deletions

View File

@ -0,0 +1,8 @@
services:
directory_sync_service:
image: "samply/directory_sync_service"
environment:
DS_DIRECTORY_URL: ${DS_DIRECTORY_URL}
DS_DIRECTORY_USER_NAME: ${DS_DIRECTORY_USER_NAME}
DS_DIRECTORY_PASS_CODE: ${DS_DIRECTORY_PASS_CODE}
DS_TIMER_CRON: ${DS_TIMER_CRON}

8
bbmri/directory-sync.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
function dirSetup() {
if [ -n "$DS_DIRECTORY_USER_NAME" ]; then
log INFO "Directory sync setup detected -- will start directory sync service."
OVERRIDE+=" -f ./$PROJECT/directory-sync-compose.yml"
fi
}

View File

@ -104,14 +104,6 @@ services:
- /etc/bridgehead/trusted-ca-certs:/conf/trusted-ca-certs:ro - /etc/bridgehead/trusted-ca-certs:/conf/trusted-ca-certs:ro
- ./root.crt.pem:/conf/root.crt.pem:ro - ./root.crt.pem:/conf/root.crt.pem:ro
directory_sync_service:
image: "samply/directory_sync_service"
environment:
DS_DIRECTORY_URL: ${DS_DIRECTORY_URL}
DS_DIRECTORY_USER_NAME: ${DS_DIRECTORY_USER_NAME}
DS_DIRECTORY_PASS_CODE: ${DS_DIRECTORY_PASS_CODE}
DS_TIMER_CRON: ${DS_TIMER_CRON}
volumes: volumes:
blaze-data: blaze-data:

View File

@ -5,3 +5,7 @@ SPOT_BEAM_SECRET_SHORT="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | he
SPOT_BEAM_SECRET_LONG="ApiKey spot.${PROXY_ID} ${SPOT_BEAM_SECRET_SHORT}" SPOT_BEAM_SECRET_LONG="ApiKey spot.${PROXY_ID} ${SPOT_BEAM_SECRET_SHORT}"
SUPPORT_EMAIL=bridgehead@helpdesk.bbmri-eric.eu SUPPORT_EMAIL=bridgehead@helpdesk.bbmri-eric.eu
PRIVATEKEYFILENAME=/etc/bridgehead/pki/${SITE_ID}.priv.pem PRIVATEKEYFILENAME=/etc/bridgehead/pki/${SITE_ID}.priv.pem
# This will load directory-sync setup.
source $PROJECT/directory-sync.sh
dirSetup