Merge pull request #7 from samply/feature/landingpage-as-container

New landing page that does not require a docker volume.
This commit is contained in:
patrickskowronekdkfz 2022-05-11 09:07:21 +02:00 committed by GitHub
commit 4c5eb05d26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 21 additions and 140 deletions

View File

@ -18,7 +18,7 @@ cd $BASE
source ./lib/functions.sh source ./lib/functions.sh
action=$1 action=$1
project=$2 export project=$2
if [[ -z $1 || -z $2 ]]; then if [[ -z $1 || -z $2 ]]; then
printUsage printUsage
@ -46,7 +46,6 @@ source /etc/bridgehead/site.conf
case "$action" in case "$action" in
start) start)
checkRequirements checkRequirements
./lib/generate-landingpage.sh
exec docker-compose -f ./$project/docker-compose.yml --env-file /etc/bridgehead/$project.env up exec docker-compose -f ./$project/docker-compose.yml --env-file /etc/bridgehead/$project.env up
;; ;;
stop) stop)

View File

@ -39,14 +39,16 @@ services:
landing: landing:
container_name: bridgehead-landingpage container_name: bridgehead-landingpage
image: nginx:stable image: samply/bridgehead-landingpage:master
volumes:
- ../landing/:/usr/share/nginx/html:ro
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.http.routers.landing.rule=PathPrefix(`/`)" - "traefik.http.routers.landing.rule=PathPrefix(`/`)"
- "traefik.http.services.landing.loadbalancer.server.port=80" - "traefik.http.services.landing.loadbalancer.server.port=80"
- "traefik.http.routers.landing.tls=true" - "traefik.http.routers.landing.tls=true"
environment:
HOST: ${HOST}
project: ${project}
site_name: ${site_name}
blaze: blaze:
image: "samply/blaze:0.17" image: "samply/blaze:0.17"
@ -68,12 +70,13 @@ services:
- "traefik.http.routers.blaze_ccp.tls=true" - "traefik.http.routers.blaze_ccp.tls=true"
ccp-search-share: ccp-search-share:
image: "samply/dktk-fed-search-share" image: "samply/dktk-fed-search-share:main"
container_name: bridgehead-ccp-share container_name: bridgehead-ccp-share
environment: environment:
APP_BASE_URL: "http://dktk-fed-search-share:8080" APP_BASE_URL: "http://dktk-fed-search-share:8080"
APP_BROKER_BASEURL: "https://dktk-fed-search.verbis.dkfz.de/broker/rest/searchbroker" APP_BROKER_BASEURL: "https://dktk-fed-search.verbis.dkfz.de/broker/rest/searchbroker"
APP_BROKER_MAIL: ${CCP_SEARCHBROKER_USERNAME} APP_BROKER_MAIL: ${CCP_SEARCHBROKER_USERNAME}
APP_BROKER_AUTHTOKEN: ${CCP_SEARCHBROKER_PASSWORD}
APP_STORE_BASEURL: "http://bridgehead-ccp-blaze:8080/fhir" APP_STORE_BASEURL: "http://bridgehead-ccp-blaze:8080/fhir"
SPRING_DATASOURCE_URL: "jdbc:postgresql://bridgehead-ccp-share-db:5432/dktk-fed-search-share" SPRING_DATASOURCE_URL: "jdbc:postgresql://bridgehead-ccp-share-db:5432/dktk-fed-search-share"
JAVA_TOOL_OPTIONS: "-Xmx1g" JAVA_TOOL_OPTIONS: "-Xmx1g"

View File

@ -44,14 +44,16 @@ services:
landing: landing:
container_name: bridgehead-landingpage container_name: bridgehead-landingpage
image: nginx:stable image: samply/bridgehead-landingpage
volumes:
- ../landing/:/usr/share/nginx/html
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.http.routers.landing.rule=PathPrefix(`/`)" - "traefik.http.routers.landing.rule=PathPrefix(`/`)"
- "traefik.http.services.landing.loadbalancer.server.port=80" - "traefik.http.services.landing.loadbalancer.server.port=80"
- "traefik.http.routers.landing.tls=true" - "traefik.http.routers.landing.tls=true"
environment:
HOST: ${HOST}
project: ${project}
site_name: ${site_name}
blaze: blaze:
image: "samply/blaze:0.17" image: "samply/blaze:0.17"
@ -94,4 +96,4 @@ services:
POSTGRES_PASSWORD: ${CONNECTOR_POSTGRES_PASS} POSTGRES_PASSWORD: ${CONNECTOR_POSTGRES_PASS}
volumes: volumes:
- "gbn-connector-db-data:/var/lib/postgresql/data" - "gbn-connector-db-data:/var/lib/postgresql/data"
restart: "always" restart: "always"

View File

@ -1,124 +0,0 @@
#!/bin/bash
if [ ! -d ./landing ]
then
mkdir landing
fi
CENTRAL_SERVICES=" <tr>
<td>CCP-IT</td>
<td><a href=\"https://monitor.vmitro.de/icingaweb2/dashboard\">Monitoring Service</td>
</tr>"
LOCAL_SERVICES=" <tr>
<td>Bridgehead</td>
<td>Reverse Proxy <a href=\"https://${HOST}:8080/\">Traefik</a></td>
</tr>"
if [ "$project" = "ccp" ]
then
CENTRAL_SERVICES+=" <tr>
<td>CCP-IT</td>
<td><a href=\"https://patientlist.ccp-it.dktk.dkfz.de\">Zentrale Patientenliste</td>
</tr>
<tr>
<td>CCP-IT</td>
<td><a href=\"https://decentralsearch.ccp-it.dktk.dkfz.de\">Dezentrale Suche</td>
</tr>
<tr>
<td>CCP-IT</td>
<td><a href=\"https://centralsearch.ccp-it.dktk.dkfz.de\">Zentrale Suche</td>
</tr>
<tr>
<td>CCP-IT</td>
<td><a href=\"https://deployment.ccp-it.dktk.dkfz.de\">Deployment-Server</td>
</tr>
<tr>
<td>CCP-IT</td>
<td><a href=\"https://dktk-kne.kgu.de\">Zentraler Kontrollnummernerzeuger</td>
</tr>
"
LOCAL_SERVICES+=" <tr>
<td>CCP</td>
<td><a href=\"https://${HOST}/ccp-localdatamanagement/fhir/\">Blaze</a></td>
</tr>
"
fi
if [ "$project" = "gbn" ]
then
CENTRAL_SERVICES+=" <tr>
<td>GBN</td>
<td><a href=\"https://samplelocator.bbmri.de/search\">Sample Locator</td>
</tr>
<tr>
<td>GBN</td>
<td><a href=\"https://negotiator.bbmri-eric.eu/login.xhtml\">Negotiator</td>
</tr>
"
LOCAL_SERVICES+=" <tr>
<td>CCP</td>
<td><a href=\"https://${HOST}/gbn-localdatamanagement/fhir/\">Blaze</a></td>
</tr>
"
fi
cat > ./landing/index.html <<EOL
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<title>Bridgehead Overview</title>
<!-- Bootstrap core CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin="anonymous"></script>
</head>
<body class="d-flex flex-column min-vh-100">
<nav class="navbar navbar-light" style="background-color: #aad7f6;">
<h2 class="pb-2 border-bottom">Bridgehead ${site_name}</h2>
</nav>
<div class="container px-4 py-5" id="featured-3">
<div>
<h2>Components</h2>
<h3>Central</h3>
<table class="table">
<thead class="thead-dark">
<tr>
<th style="width: 50%">Group</th>
<th style="width: 50%">Service</th>
</tr>
</thead>
<tbody>
${CENTRAL_SERVICES}
</tbody>
</table>
</div>
<div>
<h3>Local</h3>
<table class="table">
<thead class="thead-dark">
<tr>
<th style="width: 50%">Project</th>
<th style="width: 50%">Services</th>
</tr>
</thead>
<tbody>
${LOCAL_SERVICES}
</tbody>
</table>
</div>
<footer class="footer mt-auto py-3">
<a href="https://dktk.dkfz.de/"><img src="https://www.oncoray.de/fileadmin/files/bilder_gruppen/DKTK/Logo_DKTK_neu_2016.jpg" style="max-width: 30%; height: auto;"></a> DKTK 2022<span style="float: right;"><a href="https://github.com/samply/bridgehead"><button type="button" class="btn btn-primary">Documentaion</button></a></span>
</footer>
</body>
</html>
EOL

View File

@ -65,7 +65,7 @@ if [ ! -d "certs" ]; then
mkdir -p certs mkdir -p certs
fi fi
if [ -e "/etc/bridgehead/traefik.crt" ]; then if [ ! -e "certs/traefik.crt" ]; then
openssl req -x509 -newkey rsa:4096 -nodes -keyout certs/traefik.key -out certs/traefik.crt -days 365 openssl req -x509 -newkey rsa:4096 -nodes -keyout certs/traefik.key -out certs/traefik.crt -days 365
fi fi

View File

@ -34,15 +34,16 @@ services:
## Needs internal proxy config ## Needs internal proxy config
landing: landing:
container_name: bridgehead-landingpage container_name: bridgehead-landingpage
image: nginx:stable image: samply/bridgehead-landingpage
volumes:
- ../landing/:/usr/share/nginx/html
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.http.routers.landing.rule=PathPrefix(`/`)" - "traefik.http.routers.landing.rule=PathPrefix(`/`)"
- "traefik.http.services.landing.loadbalancer.server.port=80" - "traefik.http.services.landing.loadbalancer.server.port=80"
- "traefik.http.routers.landing.tls=true" - "traefik.http.routers.landing.tls=true"
environment:
HOST: ${HOST}
project: ${project}
site_name: ${site_name}
nngm-connector: nngm-connector:
container_name: bridgehead-nngm-connector container_name: bridgehead-nngm-connector
@ -82,4 +83,4 @@ services:
volumes: volumes:
nngm-connector-db-data: nngm-connector-db-data:
nngm-connector-logs: nngm-connector-logs:
bridgehead-proxy: bridgehead-proxy: