Some more improvements for deployment
This commit is contained in:
parent
8c5e8ed833
commit
63b279617b
|
@ -74,13 +74,13 @@ services:
|
|||
|
||||
ccp-search-share:
|
||||
image: "ghcr.io/samply/dktk-fed-search-share:main"
|
||||
container_name: bridgehead_ccp_share
|
||||
container_name: bridgehead-ccp-share
|
||||
environment:
|
||||
APP_BASE_URL: "http://dktk-fed-search-share:8080"
|
||||
APP_BROKER_BASEURL: "http://dktk-fed-search.verbis.dkfz.de/broker/rest/searchbroker"
|
||||
APP_BROKER_MAIL: "foo@bar.de"
|
||||
APP_STORE_BASEURL: "http://bridgehead-dktk-blaze:8080/fhir"
|
||||
SPRING_DATASOURCE_URL: "jdbc:postgresql://bridgehead_ccp_share_db:5432/dktk-fed-search-share"
|
||||
APP_STORE_BASEURL: "http://bridgehead-ccp-blaze:8080/fhir"
|
||||
SPRING_DATASOURCE_URL: "jdbc:postgresql://bridgehead-ccp-share-db:5432/dktk-fed-search-share"
|
||||
JAVA_TOOL_OPTIONS: "-Xmx1g"
|
||||
# http_proxy: "http://bridgehead-squid:3128"
|
||||
# https_proxy: "http://bridgehead-squid:3128"
|
||||
|
@ -91,14 +91,14 @@ services:
|
|||
- blaze
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.dktk-fed-search.rule=PathPrefix(`/dktk-connector`)"
|
||||
- "traefik.http.routers.dktk-fed-search.rule=PathPrefix(`/cpp-connector`)"
|
||||
- "traefik.http.services.dktk-fed-search.loadbalancer.server.port=8080"
|
||||
extra_hosts:
|
||||
- "dktk-fed-search.verbis.dkfz.de:10.133.193.8"
|
||||
|
||||
ccp-search-share-db:
|
||||
image: "postgres:14"
|
||||
container_name: bridgehead_ccp_share_db
|
||||
container_name: bridgehead-ccp-share-db
|
||||
environment:
|
||||
POSTGRES_USER: "dktk-fed-search-share"
|
||||
POSTGRES_PASSWORD: "dktk-fed-search-share"
|
||||
|
|
|
@ -53,9 +53,6 @@ services:
|
|||
depends_on:
|
||||
- "gbn-connector-db"
|
||||
restart: "always"
|
||||
env_file:
|
||||
###TODO: Move into Image
|
||||
- internal.env
|
||||
|
||||
gbn-connector-db:
|
||||
image: "postgres:10.17"
|
||||
|
|
|
@ -15,40 +15,42 @@ for prerequisite in $prerequisites; do
|
|||
# TODO: Check for specific version
|
||||
done
|
||||
|
||||
echo "Checking site.conf"
|
||||
echo "Checking /etc/bridgehead-config/"
|
||||
|
||||
## Download submodule
|
||||
if [ ! -d "/etc/bridgehead-config/" ]; then
|
||||
echo "Please set up the site-config folder. Instruction are in the readme."
|
||||
exit 1
|
||||
else
|
||||
echo "Done"
|
||||
fi
|
||||
|
||||
echo "Checking /etc/bridgehead-config/site.conf"
|
||||
|
||||
#check if site.conf is created
|
||||
if [ ! -f site.conf ]; then
|
||||
if [ ! -f /etc/bridgehead-config/site.conf ]; then
|
||||
echo "Please create your specific site.conf file from the site.dev.conf"
|
||||
exit
|
||||
exit 1
|
||||
else
|
||||
echo "Done"
|
||||
fi
|
||||
|
||||
#Load site specific variables
|
||||
source site.conf
|
||||
source /etc/bridgehead-config/site.conf
|
||||
|
||||
if [ -z "$site_name" ]; then
|
||||
echo "Please set site_name"
|
||||
exit 1
|
||||
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."
|
||||
exit
|
||||
else
|
||||
echo "Site configuration is already loaded"
|
||||
fi
|
||||
|
||||
#Check if a project is selected
|
||||
if [ -z "$project" ]; then
|
||||
echo "No project selected! Please add a Project in your local site.conf."
|
||||
exit
|
||||
fi
|
||||
|
||||
#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"
|
||||
if [ -d "/etc/bridgehead-config/${project}.env" ]; then
|
||||
echo "Please copy the tempalte from ${project} and put it in the /etc/bridgehead-config/ folder"
|
||||
exit 1
|
||||
else
|
||||
echo "Done"
|
||||
fi
|
||||
|
||||
echo "All prerequisites are met!"
|
||||
|
|
|
@ -2,22 +2,28 @@
|
|||
### Note: Currently not complete, needs some features before useable for production
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "No arguments provided"
|
||||
echo "Please provide a Project as argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $1 != "ccp" ] && [ $1 != "nngm" ] && [ $1 != "gbn" ]; then
|
||||
echo "Please provide a supported project like ccp, gbn or nngm"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export project=$1
|
||||
|
||||
source lib/functions.sh
|
||||
|
||||
if ! lib/prerequisites.sh; then
|
||||
log "Prerequisites failed, exiting"
|
||||
exit
|
||||
log "Validating Prerequisites failed, please fix the occurring error"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
./lib/generate.sh
|
||||
|
||||
log "Starting bridgehead"
|
||||
|
||||
# TODO: Check $1 for proper values
|
||||
docker-compose -f $1/docker-compose.yml --env-file bridgehead-config/$1.env up -d
|
||||
docker-compose -f $1/docker-compose.yml --env-file /etc/bridgehead-config/$1.env up -d
|
||||
|
||||
log "The bridgehead should be in online in a few seconds"
|
||||
|
|
|
@ -2,7 +2,17 @@
|
|||
|
||||
source lib/functions.sh
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "Please provide a Project as argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $1 != "ccp" ] && [$1 != "nngm"] && [ $1 != "gbn" ]; then
|
||||
echo "Please provide a supported project like ccp, gbn or nngm"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log "Stopping bridgehead"
|
||||
|
||||
# TODO: Check $1 for proper values
|
||||
docker-compose -f $1/docker-compose.yml --env-file bridgehead-config/$1.env down
|
||||
docker-compose -f $1/docker-compose.yml --env-file /etc/bridgehead-config/$1.env down
|
||||
|
|
Loading…
Reference in New Issue