Updated gbn docker-compose

This commit is contained in:
Patrick Skowronek 2022-05-09 08:09:14 +02:00
parent 0fce958f44
commit 445add6d30
3 changed files with 66 additions and 44 deletions

View File

@ -1,7 +1,6 @@
version: "3.7" version: "3.7"
services: services:
### Does not need proxy settings
traefik: traefik:
container_name: bridgehead-traefik container_name: bridgehead-traefik
image: traefik:2.4 image: traefik:2.4
@ -29,8 +28,6 @@ services:
extra_hosts: extra_hosts:
- "host.docker.internal:host-gateway" - "host.docker.internal:host-gateway"
### Does need to know the outside proxy to connect central components
forward_proxy: forward_proxy:
container_name: bridgehead-forward-proxy container_name: bridgehead-forward-proxy
image: ubuntu/squid image: ubuntu/squid
@ -40,7 +37,6 @@ services:
volumes: volumes:
- "bridgehead-proxy:/var/log/squid" - "bridgehead-proxy:/var/log/squid"
## Needs internal proxy config
landing: landing:
container_name: bridgehead-landingpage container_name: bridgehead-landingpage
image: nginx:stable image: nginx:stable
@ -52,7 +48,6 @@ services:
- "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"
## Needs internal proxy config
blaze: blaze:
image: "samply/blaze:0.17" image: "samply/blaze:0.17"
container_name: bridgehead-ccp-blaze container_name: bridgehead-ccp-blaze

View File

@ -7,20 +7,43 @@ volumes:
services: services:
traefik: traefik:
container_name: bridgehead-traefik
image: traefik:2.4 image: traefik:2.4
command: command:
- --api.insecure=true
- --entrypoints.web.address=:80 - --entrypoints.web.address=:80
- --entrypoints.web-secure.address=:443 - --entrypoints.websecure.address=:443
- --providers.docker=true - --providers.docker=true
- --api.dashboard=true
- --accesslog=true # print access-logs
- --entrypoints.web.http.redirections.entrypoint.to=websecure
- --entrypoints.web.http.redirections.entrypoint.scheme=https
labels:
- "traefik.http.routers.dashboard.rule=PathPrefix(`/api`) || PathPrefix(`/dashboard`)"
- "traefik.http.routers.dashboard.entrypoints=websecure"
- "traefik.http.routers.dashboard.service=api@internal"
- "traefik.http.routers.dashboard.tls=true"
- "traefik.http.routers.dashboard.middlewares=auth"
- "traefik.http.middlewares.auth.basicauth.users=${bc_auth_users}"
ports: ports:
- 80:80 - 80:80
- 443:443 - 443:443
- 8080:8080
volumes: volumes:
- ../certs:/tools/certs
- /var/run/docker.sock:/var/run/docker.sock:ro - /var/run/docker.sock:/var/run/docker.sock:ro
extra_hosts:
- "host.docker.internal:host-gateway"
forward_proxy:
container_name: bridgehead-forward-proxy
image: ubuntu/squid
environment:
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
volumes:
- "bridgehead-proxy:/var/log/squid"
landing: landing:
container_name: bridgehead-landingpage
image: nginx:stable image: nginx:stable
volumes: volumes:
- ../landing/:/usr/share/nginx/html - ../landing/:/usr/share/nginx/html
@ -28,22 +51,31 @@ services:
- "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"
blaze:
image: "samply/blaze:0.17"
container_name: bridgehead-ccp-blaze
environment:
BASE_URL: "http://blaze:8080"
JAVA_TOOL_OPTIONS: "-Xmx4g"
LOG_LEVEL: "debug"
ENFORCE_REFERENTIAL_INTEGRITY: "false"
volumes:
- "blaze-data:/app/data"
labels:
- "traefik.enable=true"
- "traefik.http.middlewares.cpp-auth.basicauth.users=${bc_auth_users}"
- "traefik.http.routers.blaze_ccp.rule=PathPrefix(`/ccp-localdatamanagement`)"
- "traefik.http.middlewares.ccp_b_strip.stripprefix.prefixes=/ccp-localdatamanagement"
- "traefik.http.services.blaze_ccp.loadbalancer.server.port=8080"
- "traefik.http.routers.blaze_ccp.middlewares=ccp_b_strip,cpp-auth"
- "traefik.http.routers.blaze_ccp.tls=true"
gbn-connector: gbn-connector:
image: "samply/share-client:gbn-feature-environmentPreconfigurationTorben" image: "samply/share-client:gbn-feature-environmentPreconfiguration"
environment: environment:
POSTGRES_HOST: "gbn-connector-db"
POSTGRES_PASSWORD: ${CONNECTOR_POSTGRES_PASS} POSTGRES_PASSWORD: ${CONNECTOR_POSTGRES_PASS}
HTTP_PROXY_USER: ${HTTP_PROXY_USER}
HTTP_PROXY_PASSWORD: ${HTTP_PROXY_PASSWORD}
HTTPS_PROXY_USER: ${HTTPS_PROXY_USER}
HTTPS_PROXY_PASSWORD: ${HTTPS_PROXY_PASSWORD}
LDM_URL: "${PROTOCOL}://${HOST}:${PORT}/fhir"
env_file:
- ../site-config/gbn.env
extra_hosts:
- "host.docker.internal:host-gateway"
- "${HOST}:${HOSTIP}"
volumes: volumes:
- "gbn-connector-logs:/usr/local/tomcat/logs" - "gbn-connector-logs:/usr/local/tomcat/logs"
labels: labels:
@ -62,23 +94,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"
gbn-store:
image: "samply/blaze:0.15"
environment:
BASE_URL: "${PROTOCOL}://${HOST}:${PORT}"
JAVA_TOOL_OPTIONS: "-Xmx4g"
env_file:
- ../site-config/gbn.env
volumes:
- "gbn-store-db-data:/app/data"
labels:
- "traefik.enable=true"
- "traefik.http.middlewares.test-auth.basicauth.users=user:$$apr1$$RjhTX8\
ji$$3ToBWBch1K4RBnvp86TuH/"
- "traefik.http.routers.blaze_gbn.rule=PathPrefix(`/gbn-localdatamanagement`)"
- "traefik.http.middlewares.gbn_b_strip.stripprefix.prefixes=/gbn-localdatamanagement"
- "traefik.http.services.blaze_gbn.loadbalancer.server.port=8080"
- "traefik.http.routers.blaze_gbn.middlewares=gbn_b_strip,test-auth"
restart: "always"

View File

@ -38,10 +38,6 @@ then
<td><a href=\"https://dktk-kne.kgu.de\">Zentraler Kontrollnummernerzeuger</td> <td><a href=\"https://dktk-kne.kgu.de\">Zentraler Kontrollnummernerzeuger</td>
</tr> </tr>
" "
fi
if [ "$project" = "ccp" ]
then
LOCAL_SERVICES+=" <tr> LOCAL_SERVICES+=" <tr>
<td>CCP</td> <td>CCP</td>
<td><a href=\"https://${HOST}/cpp-localdatamanagement/fhir/\">Blaze</a></td> <td><a href=\"https://${HOST}/cpp-localdatamanagement/fhir/\">Blaze</a></td>
@ -49,6 +45,24 @@ then
" "
fi 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 cat > ./landing/index.html <<EOL
<html lang="en"> <html lang="en">