Added files for running a gbn project
This commit is contained in:
parent
c683bb76bc
commit
ed2f2ad590
|
@ -0,0 +1,10 @@
|
|||
##Ignore site configuration
|
||||
.gitsubmodules
|
||||
site-config
|
||||
|
||||
## Ignore site configuration
|
||||
config/**/*
|
||||
!config/**/*.default
|
||||
docker-compose.override.yml
|
||||
site-specific.conf
|
||||
|
|
@ -1,23 +1,16 @@
|
|||
[Unit]
|
||||
Description=Bridgehead (%i) Service
|
||||
Requires=traefik.service
|
||||
After=traefik.service
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
RestartSec=30
|
||||
|
||||
WorkingDirectory=/srv/docker/bridgehead
|
||||
WorkingDirectory=/srv/docker/bridgehead/%i
|
||||
|
||||
ExecStartPre=/usr/local/bin/docker-compose --env-file site-config/%i.env down
|
||||
ExecStartPre=/usr/local/bin/docker-compose --env-file site-config/%i.env rm
|
||||
ExecStartPre=CONNECTOR_POSTGRES_PASSWORD=%i_CONNECTOR_POSTGRES_PASSWORD
|
||||
ExecStartPre=export CONNECTOR_POSTGRES_PASSWORD
|
||||
ExecStart=/usr/local/bin/docker-compose --env-file site-config/%i.env up
|
||||
ExecStart=CONNECTOR_POSTGRES_PASSWORD=
|
||||
ExecStart=export CONNECTOR_POSTGRES_PASSWORD
|
||||
ExecStartPre=/usr/local/bin/docker-compose --env-file ../site-config/%i.env down
|
||||
ExecStart=/usr/local/bin/docker-compose --env-file ../site-config/%i.env up
|
||||
|
||||
ExecStop=/usr/local/bin/docker-compose --env-file site-config/%i.env down
|
||||
ExecStop=/usr/local/bin/docker-compose --env-file ../site-config/%i.env down
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
[Unit]
|
||||
Description=Traefik Service
|
||||
Requires=docker.service
|
||||
After=docker.service
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
RestartSec=30
|
||||
|
||||
WorkingDirectory=/srv/docker/bridgehead
|
||||
|
||||
ExecStartPre=/usr/local/bin/docker-compose --env-file site-config/start.env down
|
||||
ExecStartPre=/usr/local/bin/docker-compose --env-file site-config/start.env rm
|
||||
ExecStart=/usr/local/bin/docker-compose --env-file site-config/start.env up
|
||||
|
||||
ExecStop=/usr/local/bin/docker-compose --env-file site-config/start.env down
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -22,7 +22,7 @@ services:
|
|||
POSTGRES_HOST: "connector-db"
|
||||
POSTGRES_DB: "samply.connector"
|
||||
POSTGRES_USER: "samply"
|
||||
POSTGRES_PASS: "samply"
|
||||
POSTGRES_PASS: ${GBN_CONNECTOR_POSTGRES_PASS}
|
||||
STORE_URL: "http://store:8080/fhir"
|
||||
QUERY_LANGUAGE: "CQL"
|
||||
MDR_URL: "https://mdr.germanbiobanknode.de/v3/api/mdr"
|
||||
|
@ -37,7 +37,7 @@ services:
|
|||
|
||||
connector-db:
|
||||
container_name: "connector-db"
|
||||
image: "postgres:9.6"
|
||||
image: "postgres:10.17"
|
||||
environment:
|
||||
POSTGRES_USER: "samply"
|
||||
POSTGRES_PASSWORD: "samply"
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
GBN_CONNECTOR_POSTGRES_PASS=samply
|
||||
|
|
@ -33,7 +33,6 @@ echo "Starting Project ${project} "
|
|||
echo "Enabling nightly updates for bridgehead@${project}.service ..."
|
||||
sudo systemctl enable --now bridgehead-update@"${project}".timer
|
||||
fi
|
||||
done
|
||||
|
||||
# Switch back to execution directory;
|
||||
cd -
|
||||
|
|
|
@ -14,7 +14,8 @@ for prerequisite in $prerequisites; do
|
|||
fi
|
||||
# TODO: Check for specific version
|
||||
done
|
||||
echo "All prerequisites are installed. Now we can download the bridgehead from https://code.mitro.dkfz.de/scm/docker/c4.bk.docker.git."
|
||||
|
||||
echo "Checking site.conf"
|
||||
|
||||
#check if site.conf is created
|
||||
if [ ! -f site.conf ]; then
|
||||
|
@ -26,11 +27,11 @@ fi
|
|||
source site.conf
|
||||
|
||||
if [ -z "$site_name" ]; then
|
||||
echo "Site name is empty,please enter site name:"
|
||||
read -r site_name
|
||||
site_name_lowercase=$(echo "$site_name" | tr '[:upper:]' '[:lower:]')
|
||||
echo "Please set site_name"
|
||||
fi
|
||||
|
||||
echo "Checking site-config module"
|
||||
|
||||
## Download submodule
|
||||
if [ ! -d "site-config" ]; then
|
||||
echo "Please set up the site-config folder. Instruction are in the readme."
|
||||
|
@ -45,5 +46,9 @@ if [ -z "$project" ]; then
|
|||
exit
|
||||
fi
|
||||
|
||||
# Check for each project
|
||||
#check if project env is present
|
||||
if [ -d "site-config/${project}.env" ]; then
|
||||
echo "Please copy the tempalte from ${project} and put it in the site-config folder"
|
||||
fi
|
||||
|
||||
echo "All prerequisites meet! All systems are ready to go!"
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
#!/bin/bash
|
||||
### This is the configuration file for secrets, only your site should know
|
||||
### Because the deployment via systemd is not possible in the current wsl environment,
|
||||
### developers need to export the necessary variables.
|
||||
### You can copy this file to site-specific.conf and run source site-specific.conf.
|
||||
### After this docker-compose up should use the environment variables defined in this file.
|
||||
|
||||
### Connector configuration
|
||||
## The password the for your connector database
|
||||
export dktk_CONNECTOR_POSTGRES_PASSWORD=
|
||||
export c4_CONNECTOR_POSTGRES_PASSWORD=
|
||||
export gbn_CONNECTOR_POSTGRES_PASSWORD=
|
||||
|
||||
### Local Datamanagenment configuration if necessary
|
||||
## Supply this, if you use samplystore
|
||||
# export LDM_DATABASE_PASSWORD=this-should-only-be-used-by-developers-ldm-database-password;
|
||||
|
||||
### ID-Management configuration
|
||||
## provided by DKFZ with cooperation in Mainz
|
||||
export CCP_PATIENTLISTE_APIKEY=
|
||||
## provided by DKFZ with cooperation in Frankfurt
|
||||
export CCP_CONTROLLNUMBERGENERATOR_APIKEY=
|
||||
export LOCAL_IDMANAGER_LDM_APIKEY=
|
||||
## Additional new ID-Manager Configuration
|
||||
export LOCAL_IDMANAGER_MAINZELLISTE_APIKEY=
|
||||
export LOCAL_IDMANAGER_CONNECTOR_APIKEY=
|
||||
export LOCAL_PATIENTLIST_DBPASS=
|
||||
|
||||
export dktk_CCP_OIDC_CLIENT_SECRET=
|
||||
export c4_CCP_OIDC_CLIENT_SECRET=
|
||||
### Mail Server username and password
|
||||
# export MAIL_USER=
|
||||
# export MAIL_PASSWORD=
|
||||
|
||||
### Monitoring
|
||||
## by default, the bridgehead will report it's state to DKFZ monitoring. Change here to opt-out.
|
||||
# export MONITOR_OPTOUT=true
|
||||
|
||||
### nNGM Configuration, only necessary if your site takes part in nNGM
|
||||
## The cts login data, that healex provided you
|
||||
# export NNGM_CTS_USER=<provided-by-healex>
|
||||
# export NNGM_CTS_PASSWORD=<provided-by-healex>
|
||||
## The idmanagement authentication data, that is provided by dkfz dataprotection office
|
||||
# export NNGM_MAGICPL_APIKEY=<provided-by-dkfz>
|
||||
# export NNGM_MAINZELLISTE_APIKEY=<provided-by-dkfz>
|
||||
|
||||
### Workaround for local developers network environment
|
||||
## Note: MSYS_NO_PATHCONV is needed, because git bash and msys2 will otherwise convert /etc/hosts to a windows path
|
||||
#export HOSTIP=$(MSYS_NO_PATHCONV=1 docker run --rm --add-host=host.docker.internal:host-gateway ubuntu cat /etc/hosts | grep 'host.docker.internal' | awk '{print $1}');
|
||||
#export HOST=$(hostname)
|
||||
|
||||
export HOSTIP=
|
||||
export HOST=
|
||||
|
||||
export site_name=
|
||||
### Write the Project you want to start with the brigdehead
|
||||
##Exmaple project=gbn
|
||||
project=
|
||||
|
Loading…
Reference in New Issue