refactor: renamed containers based on projects

Using the flag "-p bridgehead" with docker-compose to deploy all
bridgeheads on one system
This commit is contained in:
Torben Brenner 2022-02-24 13:01:05 +01:00
parent ee61ac3a03
commit 26b7e272bf
4 changed files with 122 additions and 112 deletions

View File

@ -1,12 +1,12 @@
version: "3.7" version: "3.7"
volumes: volumes:
connector_db_data: c4-connector-db-data:
connector_logs: c4-connector-logs:
patientlist_db_data: patientlist-db-data:
patientlist_logs: patientlist-logs:
idmanager_logs: id-manager-logs:
store_db_data: c4-store-db-data:
store_logs: c4-store-logs:
services: services:
traefik: traefik:
@ -17,11 +17,6 @@ services:
- --entrypoints.web.address=:80 - --entrypoints.web.address=:80
- --entrypoints.web-secure.address=:443 - --entrypoints.web-secure.address=:443
- --providers.docker=true - --providers.docker=true
environment:
http_proxy: ""
HTTP_PROXY: ""
https_proxy: ""
HTTPS_PROXY: ""
ports: ports:
- 80:80 - 80:80
- 443:443 - 443:443
@ -39,39 +34,48 @@ services:
- "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"
connector: c4-connector:
container_name: c4-connector
image: "samply/share-client:c4-feature-environmentPreconfigurationTorben" image: "samply/share-client:c4-feature-environmentPreconfigurationTorben"
environment: environment:
STORE_URL: http://store:8080 POSTGRES_HOST: "c4-connector-db"
LDM_URL: http://store:8080 ID_MANAGER_APIKEY: ${MAGICPL_API_KEY_CONNECTOR}
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}/c4-localdatamanagement"
POSTGRES_PASSWORD: ${CONNECTOR_POSTGRES_PASS}
env_file:
- ../site-config/c4.env
# Necessary for the connector to successful check the status of other components on the same host
extra_hosts:
- "host.docker.internal:host-gateway"
- "${HOST}:${HOSTIP}"
volumes: volumes:
- "connector_logs:/usr/local/tomcat/logs" - "c4-connector-logs:/usr/local/tomcat/logs"
depends_on:
- connector-db
restart: always
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.http.routers.c4_connector.rule=PathPrefix(`/c4-connector`)" - "traefik.http.routers.c4_connector.rule=PathPrefix(`/c4-connector`)"
- "traefik.http.services.c4_connector.loadbalancer.server.port=8080" - "traefik.http.services.c4_connector.loadbalancer.server.port=8080"
depends_on:
- connector-db
restart: always
connector-db: c4-connector-db:
container_name: connector-db
image: postgres:10.17 image: postgres:10.17
environment: environment:
POSTGRES_DB: "share_v2" POSTGRES_DB: "share_v2"
POSTGRES_USER: "samplyweb" POSTGRES_USER: "samplyweb"
POSTGRES_PASSWORD: ${CONNECTOR_POSTGRES_PASS} POSTGRES_PASSWORD: ${CONNECTOR_POSTGRES_PASS}
volumes: volumes:
- "connector_db_data:/var/lib/postgresql/data" - "c4-connector-db-data:/var/lib/postgresql/data"
restart: always restart: always
idmanager: id-manager:
container_name: idmanager container_name: id-manager
image: docker.verbis.dkfz.de/ccp/idmanager:bridgehead-develop image: docker.verbis.dkfz.de/ccp/idmanager:bridgehead-develop
environment: environment:
TOMCAT_REVERSEPROXY_FQDN: ${HOST}
MAGICPL_SITE: ${SITE} MAGICPL_SITE: ${SITE}
MAGICPL_MAINZELLISTE_API_KEY: ${MAGICPL_MAINZELLISTE_API_KEY} MAGICPL_MAINZELLISTE_API_KEY: ${MAGICPL_MAINZELLISTE_API_KEY}
MAGICPL_API_KEY: ${MAGICPL_API_KEY} MAGICPL_API_KEY: ${MAGICPL_API_KEY}
@ -80,8 +84,15 @@ services:
MAGICPL_CENTRAL_API_KEY: ${MAGICPL_CENTRAL_API_KEY} MAGICPL_CENTRAL_API_KEY: ${MAGICPL_CENTRAL_API_KEY}
MAGICPL_OIDC_CLIENT_ID: ${MAGICPL_OIDC_CLIENT_ID} MAGICPL_OIDC_CLIENT_ID: ${MAGICPL_OIDC_CLIENT_ID}
MAGICPL_OIDC_CLIENT_SECRET: ${MAGICPL_OIDC_CLIENT_SECRET} MAGICPL_OIDC_CLIENT_SECRET: ${MAGICPL_OIDC_CLIENT_SECRET}
TOMCAT_REVERSEPROXY_FQDN: "${HOST}"
HTTP_PROXY_USER: ${HTTP_PROXY_USER}
HTTP_PROXY_PASSWORD: ${HTTP_PROXY_PASSWORD}
HTTPS_PROXY_USER: ${HTTPS_PROXY_USER}
HTTPS_PROXY_PASSWORD: ${HTTPS_PROXY_PASSWORD}
env_file:
- ../site-config/dktk.env
volumes: volumes:
- "idmanager_logs:/usr/local/tomcat/logs" - "id-manager-logs:/usr/local/tomcat/logs"
depends_on: depends_on:
- patientlist - patientlist
labels: labels:
@ -93,13 +104,15 @@ services:
image: docker.verbis.dkfz.de/ccp/patientlist:bridgehead-develop image: docker.verbis.dkfz.de/ccp/patientlist:bridgehead-develop
environment: environment:
ML_SITE: ${SITE} ML_SITE: ${SITE}
ML_API_KEY: ${ML_API_KEY} ML_API_KEY: ${MAGICPL_MAINZELLISTE_API_KEY}
TOMCAT_REVERSEPROXY_FQDN: ${HOST} ML_DB_PASS: ${ML_DB_PASS}
TOMCAT_REVERSEPROXY_FQDN: "${HOST}"
env_file: env_file:
- ../site-config/dktk.env
# TODO: Implement automatic seed generation in mainzelliste # TODO: Implement automatic seed generation in mainzelliste
- ../site-config/patientlist.env - ../site-config/patientlist.env
volumes: volumes:
- "patientlist_logs:/usr/local/tomcat/logs" - "patientlist-logs:/usr/local/tomcat/logs"
labels: labels:
- "traefik.http.routers.patientlist.rule=PathPrefix(`/Patientlist`)" - "traefik.http.routers.patientlist.rule=PathPrefix(`/Patientlist`)"
- "traefik.http.services.patientlist.loadbalancer.server.port=8080" - "traefik.http.services.patientlist.loadbalancer.server.port=8080"
@ -115,43 +128,37 @@ services:
POSTGRES_PASSWORD: ${ML_DB_PASS} POSTGRES_PASSWORD: ${ML_DB_PASS}
TZ: "Europe/Berlin" TZ: "Europe/Berlin"
volumes: volumes:
- "patientlist_db_data:/var/lib/postgresql/data" - "patientlist-db-data:/var/lib/postgresql/data"
store: c4-store:
container_name: bridgehead_c4_store
image: docker.verbis.dkfz.de/ccp/samply.store:release-5.1.2 image: docker.verbis.dkfz.de/ccp/samply.store:release-5.1.2
environment: environment:
POSTGRES_HOST: bridgehead_c4_store_db MDR_NAMESPACE: "adt,dktk,marker"
MDR_VALIDATION: false
DEPLOYMENT_CONTEXT: "c4-localdatamanagement"
POSTGRES_HOST: c4-store-db
POSTGRES_PORT: 5432 POSTGRES_PORT: 5432
POSTGRES_DB: samplystore POSTGRES_DB: samplystore
POSTGRES_USER: samplystore POSTGRES_USER: samplystore
POSTGRES_PASSWORD: samplystore POSTGRES_PASSWORD: ${STORE_POSTGRES_PASS}
TZ: Europe/Berlin TZ: "Europe/Berlin"
volumes: volumes:
- "store_logs:/usr/local/tomcat/logs" - "c4-store-logs:/usr/local/tomcat/logs"
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.http.routers.store_c4.rule=PathPrefix(`/c4-loc\ - "traefik.http.routers.store_c4.rule=PathPrefix(`/c4-localdatamanagement`)"
aldatamanagement`)"
depends_on: depends_on:
- store_db - store-db
restart: always restart: always
env_file:
###TODO: Move into Image
- internal.env
store_db: c4-store-db:
container_name: bridgehead_c4_store_db
image: postgres:9.5-alpine image: postgres:9.5-alpine
command: postgres -c datestyle='iso, dmy' command: postgres -c datestyle='iso, dmy'
environment: environment:
POSTGRES_PORT: 5432 TZ: "Europe/Berlin"
POSTGRES_DB: samplystore POSTGRES_DB: samplystore
POSTGRES_USER: samplystore POSTGRES_USER: samplystore
POSTGRES_PASSWORD: samplystore POSTGRES_PASSWORD: ${STORE_POSTGRES_PASS}
volumes: volumes:
- "store_db_data:/var/lib/postgresql/data" - "c4-store-db-data:/var/lib/postgresql/data"
restart: always restart: always
env_file:
###TODO: Move into Image
- internal.env

View File

@ -1,12 +1,10 @@
version: "3.7" version: "3.7"
volumes: volumes:
connector_db_data: dktk-connector-db-data:
connector_logs: dktk-connector-logs:
patientlist_db_data: patientlist-db-data:
patientlist_logs: patientlist-logs:
idmanager_logs: id-manager-logs:
store_db_data:
store_logs:
services: services:
traefik: traefik:
@ -34,9 +32,10 @@ services:
- "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"
connector: dktk-connector:
image: "samply/share-client:dktk-feature-environmentPreconfigurationTorben" image: "samply/share-client:dktk-feature-environmentPreconfigurationTorben"
environment: environment:
POSTGRES_HOST: "dktk-connector-db"
ID_MANAGER_APIKEY: ${MAGICPL_API_KEY_CONNECTOR} ID_MANAGER_APIKEY: ${MAGICPL_API_KEY_CONNECTOR}
POSTGRES_PASSWORD: ${CONNECTOR_POSTGRES_PASS} POSTGRES_PASSWORD: ${CONNECTOR_POSTGRES_PASS}
HTTP_PROXY_USER: ${HTTP_PROXY_USER} HTTP_PROXY_USER: ${HTTP_PROXY_USER}
@ -50,7 +49,7 @@ services:
- "host.docker.internal:host-gateway" - "host.docker.internal:host-gateway"
- "${HOST}:${HOSTIP}" - "${HOST}:${HOSTIP}"
volumes: volumes:
- "connector_logs:/usr/local/tomcat/logs" - "dktk-connector-logs:/usr/local/tomcat/logs"
depends_on: depends_on:
- connector-db - connector-db
restart: always restart: always
@ -59,14 +58,14 @@ services:
- "traefik.http.routers.dktk_connector.rule=PathPrefix(`/dktk-connector`)" - "traefik.http.routers.dktk_connector.rule=PathPrefix(`/dktk-connector`)"
- "traefik.http.services.dktk_connector.loadbalancer.server.port=8080" - "traefik.http.services.dktk_connector.loadbalancer.server.port=8080"
connector-db: dktk-connector-db:
image: postgres:10.17 image: postgres:10.17
environment: environment:
POSTGRES_DB: "share_v2" POSTGRES_DB: "share_v2"
POSTGRES_USER: "samplyweb" POSTGRES_USER: "samplyweb"
POSTGRES_PASSWORD: ${CONNECTOR_POSTGRES_PASS} POSTGRES_PASSWORD: ${CONNECTOR_POSTGRES_PASS}
volumes: volumes:
- "connector_db_data:/var/lib/postgresql/data" - "dktk-connector-db-data:/var/lib/postgresql/data"
restart: always restart: always
id-manager: id-manager:
@ -81,7 +80,7 @@ services:
MAGICPL_CENTRAL_API_KEY: ${MAGICPL_CENTRAL_API_KEY} MAGICPL_CENTRAL_API_KEY: ${MAGICPL_CENTRAL_API_KEY}
MAGICPL_OIDC_CLIENT_ID: ${MAGICPL_OIDC_CLIENT_ID} MAGICPL_OIDC_CLIENT_ID: ${MAGICPL_OIDC_CLIENT_ID}
MAGICPL_OIDC_CLIENT_SECRET: ${MAGICPL_OIDC_CLIENT_SECRET} MAGICPL_OIDC_CLIENT_SECRET: ${MAGICPL_OIDC_CLIENT_SECRET}
TOMCAT_REVERSEPROXY_FQDN: "${PROTOCOL}://${HOST}:${PORT}" TOMCAT_REVERSEPROXY_FQDN: "${HOST}"
HTTP_PROXY_USER: ${HTTP_PROXY_USER} HTTP_PROXY_USER: ${HTTP_PROXY_USER}
HTTP_PROXY_PASSWORD: ${HTTP_PROXY_PASSWORD} HTTP_PROXY_PASSWORD: ${HTTP_PROXY_PASSWORD}
HTTPS_PROXY_USER: ${HTTPS_PROXY_USER} HTTPS_PROXY_USER: ${HTTPS_PROXY_USER}
@ -89,7 +88,7 @@ services:
env_file: env_file:
- ../site-config/dktk.env - ../site-config/dktk.env
volumes: volumes:
- "idmanager_logs:/usr/local/tomcat/logs" - "id-manager-logs:/usr/local/tomcat/logs"
depends_on: depends_on:
- patientlist - patientlist
labels: labels:
@ -103,13 +102,13 @@ services:
ML_SITE: ${SITE} ML_SITE: ${SITE}
ML_API_KEY: ${MAGICPL_MAINZELLISTE_API_KEY} ML_API_KEY: ${MAGICPL_MAINZELLISTE_API_KEY}
ML_DB_PASS: ${ML_DB_PASS} ML_DB_PASS: ${ML_DB_PASS}
TOMCAT_REVERSEPROXY_FQDN: "${PROTOCOL}://${HOST}:${PORT}" TOMCAT_REVERSEPROXY_FQDN: "${HOST}"
env_file: env_file:
- ../site-config/dktk.env - ../site-config/dktk.env
# TODO: Implement automatic seed generation in mainzelliste # TODO: Implement automatic seed generation in mainzelliste
- ../site-config/patientlist.env - ../site-config/patientlist.env
volumes: volumes:
- "patientlist_logs:/usr/local/tomcat/logs" - "patientlist-logs:/usr/local/tomcat/logs"
labels: labels:
- "traefik.http.routers.patientlist.rule=PathPrefix(`/Patientlist`)" - "traefik.http.routers.patientlist.rule=PathPrefix(`/Patientlist`)"
- "traefik.http.services.patientlist.loadbalancer.server.port=8080" - "traefik.http.services.patientlist.loadbalancer.server.port=8080"
@ -125,4 +124,4 @@ services:
POSTGRES_PASSWORD: ${ML_DB_PASS} POSTGRES_PASSWORD: ${ML_DB_PASS}
TZ: "Europe/Berlin" TZ: "Europe/Berlin"
volumes: volumes:
- "patientlist_db_data:/var/lib/postgresql/data" - "patientlist-db-data:/var/lib/postgresql/data"

View File

@ -1,10 +1,9 @@
version: '3.4' version: '3.4'
volumes: volumes:
store-db-data: gbn-connector-logs:
name: "store-db-data" gbn-connector-db-data:
connector-db-data: gbn-store-db-data:
name: "connector-db-data"
services: services:
traefik: traefik:
@ -15,11 +14,6 @@ services:
- --entrypoints.web.address=:80 - --entrypoints.web.address=:80
- --entrypoints.web-secure.address=:443 - --entrypoints.web-secure.address=:443
- --providers.docker=true - --providers.docker=true
environment:
http_proxy: ""
HTTP_PROXY: ""
https_proxy: ""
HTTPS_PROXY: ""
ports: ports:
- 80:80 - 80:80
- 443:443 - 443:443
@ -37,14 +31,51 @@ services:
- "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"
store: gbn-connector:
container_name: "bridgehead_gbn_blaze_store" image: "samply/share-client:gbn-feature-environmentPreconfigurationTorben"
environment:
POSTGRES_HOST: "gbn-connector-db"
ID_MANAGER_APIKEY: ${MAGICPL_API_KEY_CONNECTOR}
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:
- "gbn-connector-logs:/usr/local/tomcat/logs"
labels:
- "traefik.enable=true"
- "traefik.http.routers.gbn_connector.rule=PathPrefix(`/gbn-connector`)"
- "traefik.http.services.gbn_connector.loadbalancer.server.port=8080"
depends_on:
- "gbn-connector-db"
restart: "always"
gbn-connector-db:
image: "postgres:10.17"
environment:
POSTGRES_DB: "samply.connector"
POSTGRES_USER: "samply"
POSTGRES_PASSWORD: ${CONNECTOR_POSTGRES_PASS}
volumes:
- "gbn-connector-db-data:/var/lib/postgresql/data"
restart: "always"
gbn-store:
image: "samply/blaze:0.15" image: "samply/blaze:0.15"
environment: environment:
BASE_URL: "http://bridgehead_gbn_blaze_store:8080" BASE_URL: "${PROTOCOL}://${HOST}:${PORT}"
JAVA_TOOL_OPTIONS: "-Xmx4g" JAVA_TOOL_OPTIONS: "-Xmx4g"
env_file:
- ../site-config/gbn.env
volumes: volumes:
- "store-db-data:/app/data" - "gbn-store-db-data:/app/data"
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.http.middlewares.test-auth.basicauth.users=user:$$apr1$$RjhTX8\ - "traefik.http.middlewares.test-auth.basicauth.users=user:$$apr1$$RjhTX8\
@ -54,35 +85,3 @@ services:
- "traefik.http.services.blaze_gbn.loadbalancer.server.port=8080" - "traefik.http.services.blaze_gbn.loadbalancer.server.port=8080"
- "traefik.http.routers.blaze_gbn.middlewares=gbn_b_strip,test-auth" - "traefik.http.routers.blaze_gbn.middlewares=gbn_b_strip,test-auth"
restart: "always" restart: "always"
connector:
container_name: connector
image: "samply/share-client:gbn-feature-environmentPreconfigurationTorben"
environment:
POSTGRES_HOST: "bridgehead_gbn_connector_db"
POSTGRES_PASS: ${CONNECTOR_POSTGRES_PASS}
POSTGRES_PORT: 5432
STORE_URL: "http://bridgehead_gbn_blaze_store:8080/fhir"
env_file:
###TODO: Move into Image
- internal.env
labels:
- "traefik.enable=true"
- "traefik.http.routers.gbn_connector.rule=PathPrefix(`/gbn-connector`)"
- "traefik.http.services.gbn_connector.loadbalancer.server.port=8080"
depends_on:
- "connector-db"
restart: "always"
connector-db:
container_name: "bridgehead_gbn_connector_db"
image: "postgres:10.17"
environment:
POSTGRES_PASSWORD: ${CONNECTOR_POSTGRES_PASS}
POSTGRES_PORT: 5432
volumes:
- "connector-db-data:/var/lib/postgresql/data"
restart: "always"
env_file:
###TODO: Move into Image
- internal.env

View File

@ -19,6 +19,11 @@ export HTTPS_PROXY_PASSWORD=""
# the password of database connector-db # the password of database connector-db
export CONNECTOR_POSTGRES_PASS=pleaseChangeThis1 export CONNECTOR_POSTGRES_PASS=pleaseChangeThis1
### Configuration for Samply Store Secrets
# the password of database connector-db
export STORE_POSTGRES_PASS=pleaseChangeThis6
### Configuration for ID-Management Secrets ### Configuration for ID-Management Secrets
# the password of database patientlist-db # the password of database patientlist-db
export ML_DB_PASS=pleaseChangeThis2 export ML_DB_PASS=pleaseChangeThis2