From 78aa1ffc891ddd84b5445262ec4a5d004dfded97 Mon Sep 17 00:00:00 2001 From: nour-borgi Date: Mon, 10 Apr 2023 12:57:10 +0100 Subject: [PATCH 01/19] Add postgres service to Jempi --- .../docker-compose.api-dev.yml | 1 - .../docker-compose.combined-dev.yml | 6 ++ .../docker-compose.combined.yml | 33 ++++++++ .../importer/docker-compose.config.yml | 2 +- .../importer/jempi_psql_init_db.sql | 80 +++++++++++++++++++ client-registry-jempi/package-metadata.json | 8 +- client-registry-jempi/swarm.sh | 2 +- 7 files changed, 128 insertions(+), 4 deletions(-) create mode 100644 client-registry-jempi/importer/jempi_psql_init_db.sql diff --git a/client-registry-jempi/docker-compose.api-dev.yml b/client-registry-jempi/docker-compose.api-dev.yml index 9fdd32ca..30be974e 100644 --- a/client-registry-jempi/docker-compose.api-dev.yml +++ b/client-registry-jempi/docker-compose.api-dev.yml @@ -5,5 +5,4 @@ services: ports: - published: 50000 target: 50000 - protocol: tcp mode: host diff --git a/client-registry-jempi/docker-compose.combined-dev.yml b/client-registry-jempi/docker-compose.combined-dev.yml index a154d235..5497a786 100644 --- a/client-registry-jempi/docker-compose.combined-dev.yml +++ b/client-registry-jempi/docker-compose.combined-dev.yml @@ -21,3 +21,9 @@ services: target: 50000 protocol: tcp mode: host + + jempi-postgresql: + ports: + - published: 5432 + target: 5435 + mode: host diff --git a/client-registry-jempi/docker-compose.combined.yml b/client-registry-jempi/docker-compose.combined.yml index e52e033b..4de619b2 100644 --- a/client-registry-jempi/docker-compose.combined.yml +++ b/client-registry-jempi/docker-compose.combined.yml @@ -72,3 +72,36 @@ services: memory: ${JEMPI_LINKER_MEMORY_LIMIT} reservations: memory: ${JEMPI_LINKER_MEMORY_RESERVE} + + jempi-postgresql: + image: bitnami/postgresql:15.2.0 + environment: + POSTGRESQL_USERNAME: ${POSTGRESQL_USERNAME} + POSTGRESQL_DATABASE: ${POSTGRESQL_DATABASE} + ALLOW_EMPTY_PASSWORD: "yes" + deploy: + mode: replicated + replicas: 1 + resources: + limits: + cpus: ${JEMPI_POSTGRES_CPU_LIMIT} + memory: ${JEMPI_POSTGRES_MEMORY_LIMIT} + reservations: + cpus: ${JEMPI_POSTGRES_CPU_RESERVE} + memory: ${JEMPI_POSTGRES_MEMORY_RESERVE} + volumes: + - "jempi-psql-01-data:/bitnami/postgresql" + configs: + - target: /docker-entrypoint-initdb.d/jempi_psql_init_db.sql + source: jempi_psql_init_db.sql + +volumes: + jempi-psql-01-data: + + +configs: + jempi_psql_init_db.sql: + file: ./importer/jempi_psql_init_db.sql + name: jempi_psql_init_db.sql-${jempi_psql_init_db_sql_DIGEST:?err} + labels: + name: jempi diff --git a/client-registry-jempi/importer/docker-compose.config.yml b/client-registry-jempi/importer/docker-compose.config.yml index 1e08b027..08096d15 100644 --- a/client-registry-jempi/importer/docker-compose.config.yml +++ b/client-registry-jempi/importer/docker-compose.config.yml @@ -20,4 +20,4 @@ configs: file: ./kafka.js name: jempi-kafka-config.js-${jempi_kafka_config_DIGEST:?err} labels: - name: jempi-kafka + name: jempi diff --git a/client-registry-jempi/importer/jempi_psql_init_db.sql b/client-registry-jempi/importer/jempi_psql_init_db.sql new file mode 100644 index 00000000..705ec1a1 --- /dev/null +++ b/client-registry-jempi/importer/jempi_psql_init_db.sql @@ -0,0 +1,80 @@ +CREATE TABLE IF NOT EXISTS Notification_Type +( + Id uuid DEFAULT gen_random_uuid() PRIMARY KEY, + Type VARCHAR(50) +); + +CREATE TABLE IF NOT EXISTS Action_Type +( + Id UUID DEFAULT gen_random_uuid() PRIMARY KEY UNIQUE, + Type VARCHAR(50) +); + +CREATE TABLE IF NOT EXISTS Notification_State +( + Id UUID DEFAULT gen_random_uuid() PRIMARY KEY, + State VARCHAR(50) +); + +CREATE TABLE IF NOT EXISTS Notification +( + Id uuid DEFAULT gen_random_uuid() PRIMARY KEY, + Type_Id uuid, + Created date, + Reviewd_By uuid, + Reviewed_At timestamp without time zone, + State_Id uuid, + Patient_Id VARCHAR(50), + Names VARCHAR(100) +); + +CREATE TABLE IF NOT EXISTS Action +( + Id UUID DEFAULT gen_random_uuid() PRIMARY KEY, + Notification_Id UUID, + Action_Type_Id UUID, + Date date, + CONSTRAINT FK_Notification + FOREIGN KEY(Notification_Id) + REFERENCES Notification(Id), + CONSTRAINT FK_Action_Type + FOREIGN KEY(Action_Type_Id) + REFERENCES Action_Type(Id) +); + +CREATE TABLE IF NOT EXISTS Match +( + Notification_Id UUID, + Score Numeric, + Golden_Id VARCHAR(50), + CONSTRAINT FK_Notification + FOREIGN KEY(Notification_Id) + REFERENCES Notification(Id) +); + +CREATE TABLE IF NOT EXISTS candidates +( + Notification_Id UUID, + Score Numeric, + Golden_Id VARCHAR(50), + CONSTRAINT FK_Notification + FOREIGN KEY(Notification_Id) + REFERENCES Notification(Id) +); + +CREATE TABLE IF NOT EXISTS users +( + id UUID DEFAULT gen_random_uuid() PRIMARY KEY UNIQUE, + given_name VARCHAR(255), + family_name VARCHAR(255), + email VARCHAR(255) UNIQUE, + username VARCHAR(255) UNIQUE +); + +INSERT INTO Notification_State(State) +VALUES ('New'), ('Seen'), ('Actioned'), ('Accepted'), ('Pending'); + +INSERT INTO Notification_Type(Type) +VALUES ('THRESHOLD'), ('MARGIN'), ('UPDATE'); + +\dt; diff --git a/client-registry-jempi/package-metadata.json b/client-registry-jempi/package-metadata.json index 50536d39..55485713 100644 --- a/client-registry-jempi/package-metadata.json +++ b/client-registry-jempi/package-metadata.json @@ -53,6 +53,12 @@ "KC_API_URL": "http://identity-access-manager-keycloak:8080", "KC_JEMPI_CLIENT_ID": "jempi-oauth", "KC_JEMPI_CLIENT_SECRET": "Tbe3llP5OJIlqUjz7K1wPp8YDAdCOEMn", - "KC_JEMPI_ROOT_URL": "http://localhost:3033" + "KC_JEMPI_ROOT_URL": "http://localhost:3033", + "POSTGRESQL_DATABASE": "notifications", + "POSTGRESQL_USERNAME": "postgres", + "JEMPI_POSTGRES_CPU_LIMIT": "0", + "JEMPI_POSTGRES_CPU_RESERVE": "0.05", + "JEMPI_POSTGRES_MEMORY_LIMIT": "3G", + "JEMPI_POSTGRES_MEMORY_RESERVE": "500M" } } diff --git a/client-registry-jempi/swarm.sh b/client-registry-jempi/swarm.sh index d7791281..12aadab6 100644 --- a/client-registry-jempi/swarm.sh +++ b/client-registry-jempi/swarm.sh @@ -140,7 +140,7 @@ function destroy_package() { log warn "Volumes are only deleted on the host on which the command is run. Postgres volumes on other nodes are not deleted" fi - docker::prune_configs "jempi-kafka" + docker::prune_configs "jempi" } main() { From 53a7c2551ec3965ced36cec8640299132d3966fa Mon Sep 17 00:00:00 2001 From: nour-borgi Date: Thu, 13 Apr 2023 14:02:47 +0100 Subject: [PATCH 02/19] Fix hostname issue and update images --- .env.cluster | 2 ++ .env.local | 4 ++++ client-registry-jempi/docker-compose.combined.yml | 1 + client-registry-jempi/docker-compose.dgraph.yml | 3 +++ client-registry-jempi/package-metadata.json | 14 +++++++------- client-registry-jempi/swarm.sh | 1 + 6 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.env.cluster b/.env.cluster index cb646aa2..1054c1d7 100644 --- a/.env.cluster +++ b/.env.cluster @@ -71,6 +71,8 @@ HAPI_PROXY_INSTANCES=3 # Client Registry - JeMPI JEMPI_WEB_INSTANCES=3 +# Only Keycloak authentication is available in Jempi +KC_JEMPI_SSO_ENABLED=true # Resource limits OPENHIM_MEMORY_LIMIT=4G diff --git a/.env.local b/.env.local index bb297400..59370079 100644 --- a/.env.local +++ b/.env.local @@ -24,3 +24,7 @@ JS_REPORT_PACKAGE_PATH= # !NOTE: Topics should comma seperated, optional include partion and repliction values # e.g. :: -> test:3:2 (defaults to :3:1) # KAFKA_TOPICS=2xx,reprocess,3xx,metrics:3:1 + +# Client Registry - JeMPI +# Only Keycloak authentication is available in Jempi +KC_JEMPI_SSO_ENABLED=true diff --git a/client-registry-jempi/docker-compose.combined.yml b/client-registry-jempi/docker-compose.combined.yml index 4de619b2..80b2c0d9 100644 --- a/client-registry-jempi/docker-compose.combined.yml +++ b/client-registry-jempi/docker-compose.combined.yml @@ -75,6 +75,7 @@ services: jempi-postgresql: image: bitnami/postgresql:15.2.0 + hostname: postgresql environment: POSTGRESQL_USERNAME: ${POSTGRESQL_USERNAME} POSTGRESQL_DATABASE: ${POSTGRESQL_DATABASE} diff --git a/client-registry-jempi/docker-compose.dgraph.yml b/client-registry-jempi/docker-compose.dgraph.yml index 6ca9d097..296aff7d 100644 --- a/client-registry-jempi/docker-compose.dgraph.yml +++ b/client-registry-jempi/docker-compose.dgraph.yml @@ -3,6 +3,7 @@ version: '3.9' services: jempi-alpha-01: image: dgraph/dgraph:v22.0.0 + hostname: alpha-01 volumes: - jempi-alpha-01-data:/dgraph deploy: @@ -18,6 +19,7 @@ services: jempi-alpha-02: image: dgraph/dgraph:v22.0.0 + hostname: alpha-02 volumes: - jempi-alpha-02-data:/dgraph deploy: @@ -33,6 +35,7 @@ services: jempi-alpha-03: image: dgraph/dgraph:v22.0.0 + hostname: alpha-03 volumes: - jempi-alpha-03-data:/dgraph deploy: diff --git a/client-registry-jempi/package-metadata.json b/client-registry-jempi/package-metadata.json index 55485713..2c468d95 100644 --- a/client-registry-jempi/package-metadata.json +++ b/client-registry-jempi/package-metadata.json @@ -32,13 +32,13 @@ "JEMPI_API_MEMORY_LIMIT": "3G", "JEMPI_API_MEMORY_RESERVE": "500M", "JEMPI_KAFKA_TOPICS": "JeMPI-async-preprocessor,JeMPI-patient-controller,JeMPI-patient-em,JeMPI-patient-linker,JeMPI-mu-linker,JeMPI-notifications", - "JEMPI_ASYNC_RECEIVER_IMAGE_TAG": "0.1.1", - "JEMPI_SYNC_RECEIVER_IMAGE_TAG": "0.1.1", - "JEMPI_PRE_PROCESSOR_IMAGE_TAG": "0.1.1", - "JEMPI_CONTROLLER_IMAGE_TAG": "0.1.1", - "JEMPI_EM_CALCULATOR_IMAGE_TAG": "0.1.1", - "JEMPI_LINKER_IMAGE_TAG": "0.1.1", - "JEMPI_API_IMAGE_TAG": "0.1.1", + "JEMPI_ASYNC_RECEIVER_IMAGE_TAG": "0.2.0", + "JEMPI_SYNC_RECEIVER_IMAGE_TAG": "0.2.0", + "JEMPI_PRE_PROCESSOR_IMAGE_TAG": "0.2.0", + "JEMPI_CONTROLLER_IMAGE_TAG": "0.2.0", + "JEMPI_EM_CALCULATOR_IMAGE_TAG": "0.2.0", + "JEMPI_LINKER_IMAGE_TAG": "0.2.0", + "JEMPI_API_IMAGE_TAG": "0.2.0", "JEMPI_OPENHIM_PASSWORD": "instant101", "JEMPI_SESSION_SECRET": "c05ll3lesrinf39t7mc5h6un6r0c69lgfno69dsak3vabeqamouq4328cuaekros401ajdpkh60rrt", "JEMPI_FILE_IMPORT_MAX_SIZE_BYTE": 128000000, diff --git a/client-registry-jempi/swarm.sh b/client-registry-jempi/swarm.sh index 12aadab6..95254c19 100644 --- a/client-registry-jempi/swarm.sh +++ b/client-registry-jempi/swarm.sh @@ -42,6 +42,7 @@ function init_vars() { "jempi-controller" "jempi-em-calculator" "jempi-linker" + "jempi-postgresql" ) SERVICE_NAMES=( From 55c97458f404e55a74ed8a575cc20f83166f9d79 Mon Sep 17 00:00:00 2001 From: Arran Standish Date: Fri, 14 Apr 2023 12:45:42 +0200 Subject: [PATCH 03/19] Add reverse-proxy configs for the jempi-api so that the web can send requests from the frontend to it --- .env.cluster | 2 +- client-registry-jempi/docker-compose.api.yml | 4 ++ .../http-jempi-insecure.conf | 16 ++++++- .../http-jempi-secure.conf | 42 +++++++++++++++++-- reverse-proxy-nginx/package-metadata.json | 2 +- 5 files changed, 58 insertions(+), 8 deletions(-) diff --git a/.env.cluster b/.env.cluster index 1054c1d7..1527c0f2 100644 --- a/.env.cluster +++ b/.env.cluster @@ -28,7 +28,7 @@ REPMGR_PARTNER_NODES=santempi-psql-1,santempi-psql-2,santempi-psql-3 # Reverse Proxy - Nginx REVERSE_PROXY_INSTANCES=3 DOMAIN_NAME=domain -SUBDOMAINS=openhimcomms.domain,openhimcore.domain,openhimconsole.domain,kibana.domain,reports.domain,santewww.domain,santempi.domain,superset.domain,keycloak.domain,grafana.domain,minio.domain,jempi.domain +SUBDOMAINS=openhimcomms.domain,openhimcore.domain,openhimconsole.domain,kibana.domain,reports.domain,santewww.domain,santempi.domain,superset.domain,keycloak.domain,grafana.domain,minio.domain,jempi-web.domain,jempi-api.domain STAGING=true INSECURE=false diff --git a/client-registry-jempi/docker-compose.api.yml b/client-registry-jempi/docker-compose.api.yml index 813a9688..bd302706 100644 --- a/client-registry-jempi/docker-compose.api.yml +++ b/client-registry-jempi/docker-compose.api.yml @@ -20,11 +20,15 @@ services: reservations: memory: ${JEMPI_API_MEMORY_RESERVE} networks: + reverse-proxy: keycloak: kafka: default: networks: + reverse-proxy: + name: reverse-proxy_public + external: true keycloak: name: keycloak_public external: true diff --git a/reverse-proxy-nginx/package-conf-insecure/http-jempi-insecure.conf b/reverse-proxy-nginx/package-conf-insecure/http-jempi-insecure.conf index 22cee8df..5cec4be7 100644 --- a/reverse-proxy-nginx/package-conf-insecure/http-jempi-insecure.conf +++ b/reverse-proxy-nginx/package-conf-insecure/http-jempi-insecure.conf @@ -1,9 +1,21 @@ +# Jempi Web server config server { listen 3033; location / { resolver 127.0.0.11 valid=30s; - set $upstream_jempi jempi-web; - proxy_pass http://$upstream_jempi:3000; + set $upstream_jempi_web jempi-web; + proxy_pass http://$upstream_jempi_web:3000; + } +} + +# Jempi Api server config +server { + listen 50000; + + location / { + resolver 127.0.0.11 valid=30s; + set $upstream_jempi_api jempi-api; + proxy_pass http://$upstream_jempi_api:50000; } } diff --git a/reverse-proxy-nginx/package-conf-secure/http-jempi-secure.conf b/reverse-proxy-nginx/package-conf-secure/http-jempi-secure.conf index fe6c6bc2..5b7e483f 100644 --- a/reverse-proxy-nginx/package-conf-secure/http-jempi-secure.conf +++ b/reverse-proxy-nginx/package-conf-secure/http-jempi-secure.conf @@ -1,6 +1,7 @@ +# Jempi Web server config server { listen 80; - server_name jempi.*; + server_name jempi-web.*; location /.well-known/acme-challenge/ { resolver 127.0.0.11 valid=30s; @@ -15,7 +16,7 @@ server { server { listen 443 ssl; listen [::]:443 ssl; - server_name jempi.*; + server_name jempi-web.*; location /.well-known/acme-challenge/ { resolver 127.0.0.11 valid=30s; @@ -25,7 +26,40 @@ server { location / { resolver 127.0.0.11 valid=30s; - set $upstream_jempi jempi-web; - proxy_pass http://$upstream_jempi:3000; + set $upstream_jempi_web jempi-web; + proxy_pass http://$upstream_jempi_web:3000; + } +} + +# Jempi Api server config +server { + listen 80; + server_name jempi-api.*; + + location /.well-known/acme-challenge/ { + resolver 127.0.0.11 valid=30s; + set $upstream_certbot certbot; + proxy_pass http://$upstream_certbot$request_uri; + } + + location / { + return 301 https://$host$request_uri; + } +} +server { + listen 443 ssl; + listen [::]:443 ssl; + server_name jempi-api.*; + + location /.well-known/acme-challenge/ { + resolver 127.0.0.11 valid=30s; + set $upstream_certbot certbot; + proxy_pass http://$upstream_certbot$request_uri; + } + + location / { + resolver 127.0.0.11 valid=30s; + set $upstream_jempi_api jempi-api; + proxy_pass http://$upstream_jempi_api:50000; } } diff --git a/reverse-proxy-nginx/package-metadata.json b/reverse-proxy-nginx/package-metadata.json index ae512a14..fe25f009 100644 --- a/reverse-proxy-nginx/package-metadata.json +++ b/reverse-proxy-nginx/package-metadata.json @@ -16,6 +16,6 @@ "RENEWAL_EMAIL": "dummy@jembi.org", "STAGING": "true", "INSECURE": "true", - "INSECURE_PORTS": "5001:5001-80:80-8080:8080-5601:5601-5488:5488-3000:3000-9200:9200-8089:8089-9001:9001-3033:3033" + "INSECURE_PORTS": "5001:5001-80:80-8080:8080-5601:5601-5488:5488-3000:3000-9200:9200-8089:8089-9001:9001-3033:3033-50000:50000" } } From 346273cdeb5477e023c9e905eac4e8b302d259d6 Mon Sep 17 00:00:00 2001 From: Arran Standish Date: Fri, 14 Apr 2023 12:47:19 +0200 Subject: [PATCH 04/19] Fix small issue where pruning volumes would try a volume that is not defined in a service definition but is currently attached to a running container --- utils/docker-utils.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/utils/docker-utils.sh b/utils/docker-utils.sh index cf0730a7..04d433ea 100644 --- a/utils/docker-utils.sh +++ b/utils/docker-utils.sh @@ -208,6 +208,11 @@ docker::prune_volumes() { continue fi + # Ignore volumes attached to a container but are not apart of a service definition + if [[ -n $(docker ps -a --filter volume=$volume) ]]; then + continue + fi + log info "Waiting for volume $volume to be removed..." local start_time=$(date +%s) until [[ -z "$(docker volume ls -q --filter name=^$volume$ 2>/dev/null)" ]]; do From 2e9642f913eb4e038e6ddf633b01dfe6a0a300a0 Mon Sep 17 00:00:00 2001 From: nour-borgi Date: Tue, 25 Apr 2023 17:04:22 +0100 Subject: [PATCH 05/19] fix env vars and build command in react --- .env.cluster | 1 + client-registry-jempi/docker-compose.web.yml | 8 +++++--- client-registry-jempi/package-metadata.json | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.env.cluster b/.env.cluster index 820e8fc7..2c11e54d 100644 --- a/.env.cluster +++ b/.env.cluster @@ -80,6 +80,7 @@ GF_SERVER_DOMAIN=grafana.domain JEMPI_WEB_INSTANCES=3 # Only Keycloak authentication is available in Jempi KC_JEMPI_SSO_ENABLED=true +REACT_APP_JEMPI_BASE_URL=https://jempi-web.domain/JeMPI # Resource limits OPENHIM_MEMORY_LIMIT=4G diff --git a/client-registry-jempi/docker-compose.web.yml b/client-registry-jempi/docker-compose.web.yml index 59644120..172f1937 100644 --- a/client-registry-jempi/docker-compose.web.yml +++ b/client-registry-jempi/docker-compose.web.yml @@ -6,9 +6,10 @@ services: environment: REACT_APP_JEMPI_BASE_URL: ${REACT_APP_JEMPI_BASE_URL} REACT_APP_MOCK_BACKEND: ${REACT_APP_MOCK_BACKEND} - KC_FRONTEND_URL: ${KC_FRONTEND_URL} - KC_REALM_NAME: ${KC_REALM_NAME} - KC_JEMPI_CLIENT_ID: ${KC_JEMPI_CLIENT_ID} + REACT_APP_KC_FRONTEND_URL: ${KC_FRONTEND_URL} + REACT_APP_KC_REALM_NAME: ${KC_REALM_NAME} + REACT_APP_KC_JEMPI_CLIENT_ID: ${KC_JEMPI_CLIENT_ID} + command: sh -c "yarn build && serve -s build" deploy: replicas: ${JEMPI_WEB_INSTANCES} placement: @@ -23,6 +24,7 @@ services: keycloak: default: + networks: reverse-proxy: name: reverse-proxy_public diff --git a/client-registry-jempi/package-metadata.json b/client-registry-jempi/package-metadata.json index 2c468d95..9ad960d8 100644 --- a/client-registry-jempi/package-metadata.json +++ b/client-registry-jempi/package-metadata.json @@ -42,7 +42,7 @@ "JEMPI_OPENHIM_PASSWORD": "instant101", "JEMPI_SESSION_SECRET": "c05ll3lesrinf39t7mc5h6un6r0c69lgfno69dsak3vabeqamouq4328cuaekros401ajdpkh60rrt", "JEMPI_FILE_IMPORT_MAX_SIZE_BYTE": 128000000, - "REACT_APP_JEMPI_BASE_URL": "http://jempi-api:50000/JeMPI", + "REACT_APP_JEMPI_BASE_URL": "http://localhost:50000/JeMPI", "REACT_APP_MOCK_BACKEND": "false", "JEMPI_WEB_VERSION": "latest", "JEMPI_WEB_INSTANCES": 1, From 809156fa213b70ba500941cfc1588de45452f3bc Mon Sep 17 00:00:00 2001 From: nour-borgi Date: Fri, 28 Apr 2023 14:21:00 +0100 Subject: [PATCH 06/19] Fix secure mode of JEMPI_API --- .env.cluster | 1 + client-registry-jempi/docker-compose.api.yml | 3 +++ client-registry-jempi/package-metadata.json | 4 +++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.env.cluster b/.env.cluster index 2c11e54d..8ca73b17 100644 --- a/.env.cluster +++ b/.env.cluster @@ -81,6 +81,7 @@ JEMPI_WEB_INSTANCES=3 # Only Keycloak authentication is available in Jempi KC_JEMPI_SSO_ENABLED=true REACT_APP_JEMPI_BASE_URL=https://jempi-web.domain/JeMPI +JEMPI_SESSION_SECURE=true # Resource limits OPENHIM_MEMORY_LIMIT=4G diff --git a/client-registry-jempi/docker-compose.api.yml b/client-registry-jempi/docker-compose.api.yml index bd302706..9bfb5a83 100644 --- a/client-registry-jempi/docker-compose.api.yml +++ b/client-registry-jempi/docker-compose.api.yml @@ -12,6 +12,8 @@ services: JEMPI_SESSION_SECRET: ${JEMPI_SESSION_SECRET} kafka.bootstrap.servers: ${KAFKA_HOSTS} JEMPI_FILE_IMPORT_MAX_SIZE_BYTE: ${JEMPI_FILE_IMPORT_MAX_SIZE_BYTE} + JEMPI_SESSION_SECURE: ${JEMPI_SESSION_SECURE} + DOMAIN_NAME: ${DOMAIN_NAME} deploy: replicas: 1 resources: @@ -25,6 +27,7 @@ services: kafka: default: + networks: reverse-proxy: name: reverse-proxy_public diff --git a/client-registry-jempi/package-metadata.json b/client-registry-jempi/package-metadata.json index 9ad960d8..3dff6b2b 100644 --- a/client-registry-jempi/package-metadata.json +++ b/client-registry-jempi/package-metadata.json @@ -59,6 +59,8 @@ "JEMPI_POSTGRES_CPU_LIMIT": "0", "JEMPI_POSTGRES_CPU_RESERVE": "0.05", "JEMPI_POSTGRES_MEMORY_LIMIT": "3G", - "JEMPI_POSTGRES_MEMORY_RESERVE": "500M" + "JEMPI_POSTGRES_MEMORY_RESERVE": "500M", + "JEMPI_SESSION_SECURE": false, + "DOMAIN_NAME": "" } } From f029d5d0cc286004ce82f60c7a7b66f13c1db9b4 Mon Sep 17 00:00:00 2001 From: nour-borgi Date: Tue, 2 May 2023 13:30:19 +0100 Subject: [PATCH 07/19] Fix env vars --- .env.cluster | 1 + client-registry-jempi/docker-compose.api.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.env.cluster b/.env.cluster index 8ca73b17..c360f07d 100644 --- a/.env.cluster +++ b/.env.cluster @@ -72,6 +72,7 @@ HAPI_PROXY_INSTANCES=3 # Identity Access Manager - Keycloak KC_FRONTEND_URL=https://keycloak.domain KC_GRAFANA_ROOT_URL=https://grafana.domain +KC_JEMPI_ROOT_URL=https://jempi-web.domain KC_SUPERSET_ROOT_URL=https://superset.domain KC_OPENHIM_ROOT_URL=https://openhimconsole.domain GF_SERVER_DOMAIN=grafana.domain diff --git a/client-registry-jempi/docker-compose.api.yml b/client-registry-jempi/docker-compose.api.yml index 9bfb5a83..19fed3c7 100644 --- a/client-registry-jempi/docker-compose.api.yml +++ b/client-registry-jempi/docker-compose.api.yml @@ -13,7 +13,7 @@ services: kafka.bootstrap.servers: ${KAFKA_HOSTS} JEMPI_FILE_IMPORT_MAX_SIZE_BYTE: ${JEMPI_FILE_IMPORT_MAX_SIZE_BYTE} JEMPI_SESSION_SECURE: ${JEMPI_SESSION_SECURE} - DOMAIN_NAME: ${DOMAIN_NAME} + JEMPI_SESSION_DOMAIN_NAME: ${DOMAIN_NAME} deploy: replicas: 1 resources: From ca8a8c2656a9fa3915890e075ef2850055a5b1de Mon Sep 17 00:00:00 2001 From: nour-borgi Date: Wed, 3 May 2023 09:30:24 +0100 Subject: [PATCH 08/19] Fix an env var --- .env.cluster | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.cluster b/.env.cluster index c360f07d..6d7ca391 100644 --- a/.env.cluster +++ b/.env.cluster @@ -81,7 +81,7 @@ GF_SERVER_DOMAIN=grafana.domain JEMPI_WEB_INSTANCES=3 # Only Keycloak authentication is available in Jempi KC_JEMPI_SSO_ENABLED=true -REACT_APP_JEMPI_BASE_URL=https://jempi-web.domain/JeMPI +REACT_APP_JEMPI_BASE_URL=https://jempi-api.domain/JeMPI JEMPI_SESSION_SECURE=true # Resource limits From 39c42c1ebb6a5c7fb94f54a256b640375c81853c Mon Sep 17 00:00:00 2001 From: arran-standish <125864621+arran-standish@users.noreply.github.com> Date: Wed, 3 May 2023 11:40:25 +0200 Subject: [PATCH 09/19] Fix issue where volumes were not pruning --- utils/docker-utils.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/docker-utils.sh b/utils/docker-utils.sh index db4a5676..ab77fba0 100644 --- a/utils/docker-utils.sh +++ b/utils/docker-utils.sh @@ -209,7 +209,7 @@ docker::prune_volumes() { fi # Ignore volumes attached to a container but are not apart of a service definition - if [[ -n $(docker ps -a --filter volume=$volume) ]]; then + if [[ -n $(docker ps -a -q --filter volume=$volume) ]]; then continue fi From c961c6535ff4e6249cb0a238810d2cb16b9619cf Mon Sep 17 00:00:00 2001 From: Arran Standish Date: Wed, 3 May 2023 13:06:01 +0200 Subject: [PATCH 10/19] Improve non-service attached volume pruning logic --- utils/docker-utils.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/utils/docker-utils.sh b/utils/docker-utils.sh index ab77fba0..af95d2ef 100644 --- a/utils/docker-utils.sh +++ b/utils/docker-utils.sh @@ -209,12 +209,21 @@ docker::prune_volumes() { fi # Ignore volumes attached to a container but are not apart of a service definition + local start_time=$(date +%s) if [[ -n $(docker ps -a -q --filter volume=$volume) ]]; then - continue + local timeDiff=$(($(date +%s) - $start_time)) + until [[ $timeDiff -ge 10 ]]; do + timeDiff=$(($(date +%s) - $start_time)) + if [[ -n $(docker ps -a -q --filter volume=$volume) ]]; then + sleep 1 + else + continue + fi + done fi log info "Waiting for volume $volume to be removed..." - local start_time=$(date +%s) + start_time=$(date +%s) until [[ -z "$(docker volume ls -q --filter name=^$volume$ 2>/dev/null)" ]]; do docker volume rm $volume >/dev/null 2>&1 config::timeout_check "${start_time}" "$volume to be removed" "60" "10" From e3afc4624c9d60781aa9b781d32e2b6f8766990f Mon Sep 17 00:00:00 2001 From: Nour Borgi <48720958+nour-borgi@users.noreply.github.com> Date: Wed, 3 May 2023 12:11:14 +0100 Subject: [PATCH 11/19] Update docker-compose.config.yml --- client-registry-jempi/importer/docker-compose.config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/client-registry-jempi/importer/docker-compose.config.yml b/client-registry-jempi/importer/docker-compose.config.yml index 24218bcc..20953e29 100644 --- a/client-registry-jempi/importer/docker-compose.config.yml +++ b/client-registry-jempi/importer/docker-compose.config.yml @@ -18,7 +18,6 @@ services: kafka: default: - configs: jempi-kafka.js: file: ./kafka.js From ea440953ab856407466edc1b4106bc7b4d35e38f Mon Sep 17 00:00:00 2001 From: nour-borgi Date: Wed, 3 May 2023 14:37:35 +0100 Subject: [PATCH 12/19] Remove jempi-em-calculator from tests and added test to jempi-postgresql --- client-registry-jempi/docker-compose.combined.yml | 3 +++ test/cucumber/features/single-mode/jempi.feature | 13 +++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/client-registry-jempi/docker-compose.combined.yml b/client-registry-jempi/docker-compose.combined.yml index 21bf81a5..09eb69ee 100644 --- a/client-registry-jempi/docker-compose.combined.yml +++ b/client-registry-jempi/docker-compose.combined.yml @@ -113,6 +113,9 @@ services: configs: - target: /docker-entrypoint-initdb.d/jempi_psql_init_db.sql source: jempi_psql_init_db.sql + networks: + kafka: + default: volumes: jempi-psql-01-data: diff --git a/test/cucumber/features/single-mode/jempi.feature b/test/cucumber/features/single-mode/jempi.feature index ed5d5bd4..acf5e026 100644 --- a/test/cucumber/features/single-mode/jempi.feature +++ b/test/cucumber/features/single-mode/jempi.feature @@ -26,14 +26,18 @@ Feature: Client Registry JeMPI? And The service "jempi-controller" should be started with 1 replica And The service "jempi-controller" should be connected to the networks | kafka_public | jempi_default | - And The service "jempi-em-calculator" should be started with 1 replica - And The service "jempi-em-calculator" should be connected to the networks - | kafka_public | jempi_default | + # jempi-em-calculator is not ready for testing yet + # And The service "jempi-em-calculator" should be started with 1 replica + # And The service "jempi-em-calculator" should be connected to the networks + # | kafka_public | jempi_default | And The service "jempi-linker" should be started with 1 replica And The service "jempi-linker" should be connected to the networks | kafka_public | jempi_default | And The service "jempi-api" should be started with 1 replica - And The service "jempi-linker" should be connected to the networks + And The service "jempi-api" should be connected to the networks + | kafka_public | jempi_default | + And The service "jempi-postgresql" should be started with 1 replica + And The service "jempi-postgresql" should be connected to the networks | kafka_public | jempi_default | And The service "jempi-web" should be started with 1 replica And The service "jempi-web" should be connected to the networks @@ -58,6 +62,7 @@ Feature: Client Registry JeMPI? And The service "jempi-zero-01" should be removed And The service "jempi-api" should be removed And The service "jempi-web" should be removed + And The service "jempi-postgresql" should be removed And The service "mongo-1" should be removed And The service "openhim-core" should be removed And The service "openhim-console" should be removed From 68ced69bfaebde2319a88dc67db71cb56109fd0a Mon Sep 17 00:00:00 2001 From: nour-borgi Date: Wed, 3 May 2023 14:41:43 +0100 Subject: [PATCH 13/19] Add keycloak as a dependency to jempi and enable it per default --- .env.cluster | 2 -- .env.local | 4 ---- client-registry-jempi/package-metadata.json | 6 +++++- identity-access-manager-keycloak/package-metadata.json | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.env.cluster b/.env.cluster index 6d7ca391..88c21c74 100644 --- a/.env.cluster +++ b/.env.cluster @@ -79,8 +79,6 @@ GF_SERVER_DOMAIN=grafana.domain # Client Registry - JeMPI JEMPI_WEB_INSTANCES=3 -# Only Keycloak authentication is available in Jempi -KC_JEMPI_SSO_ENABLED=true REACT_APP_JEMPI_BASE_URL=https://jempi-api.domain/JeMPI JEMPI_SESSION_SECURE=true diff --git a/.env.local b/.env.local index 59370079..bb297400 100644 --- a/.env.local +++ b/.env.local @@ -24,7 +24,3 @@ JS_REPORT_PACKAGE_PATH= # !NOTE: Topics should comma seperated, optional include partion and repliction values # e.g. :: -> test:3:2 (defaults to :3:1) # KAFKA_TOPICS=2xx,reprocess,3xx,metrics:3:1 - -# Client Registry - JeMPI -# Only Keycloak authentication is available in Jempi -KC_JEMPI_SSO_ENABLED=true diff --git a/client-registry-jempi/package-metadata.json b/client-registry-jempi/package-metadata.json index 3dff6b2b..de9f1f64 100644 --- a/client-registry-jempi/package-metadata.json +++ b/client-registry-jempi/package-metadata.json @@ -4,7 +4,11 @@ "description": "A patient matching and deduplicater for the platform", "type": "infrastructure", "version": "0.0.1", - "dependencies": ["interoperability-layer-openhim", "message-bus-kafka"], + "dependencies": [ + "interoperability-layer-openhim", + "message-bus-kafka", + "identity-access-manager-keycloak" + ], "environmentVariables": { "KAFKA_HOSTS": "kafka-01:9092", "JEMPI_ZERO_01_MEMORY_LIMIT": "3G", diff --git a/identity-access-manager-keycloak/package-metadata.json b/identity-access-manager-keycloak/package-metadata.json index 928ca89a..2a9196c7 100644 --- a/identity-access-manager-keycloak/package-metadata.json +++ b/identity-access-manager-keycloak/package-metadata.json @@ -26,7 +26,7 @@ "KC_GRAFANA_CLIENT_SECRET": "CV14QfwnpYFj1IH5dK5lScPNCYAIYP1c", "KC_GRAFANA_ROOT_URL": "http://localhost:3000", "KC_GRAFANA_CLIENT_ROLES": "admin,editor,viewer", - "KC_JEMPI_SSO_ENABLED": "false", + "KC_JEMPI_SSO_ENABLED": "true", "KC_JEMPI_CLIENT_ID": "jempi-oauth", "KC_JEMPI_CLIENT_SECRET": "Tbe3llP5OJIlqUjz7K1wPp8YDAdCOEMn", "KC_JEMPI_ROOT_URL": "http://localhost:3033", From dfbb39ba6e3e86d60143514c5c9b84fdd20b7596 Mon Sep 17 00:00:00 2001 From: Arran Standish Date: Fri, 5 May 2023 08:21:51 +0200 Subject: [PATCH 14/19] Skip non-service volumes that are currently attached to a container --- utils/docker-utils.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/utils/docker-utils.sh b/utils/docker-utils.sh index af95d2ef..77d5255a 100644 --- a/utils/docker-utils.sh +++ b/utils/docker-utils.sh @@ -210,6 +210,7 @@ docker::prune_volumes() { # Ignore volumes attached to a container but are not apart of a service definition local start_time=$(date +%s) + local shouldIgnore=true if [[ -n $(docker ps -a -q --filter volume=$volume) ]]; then local timeDiff=$(($(date +%s) - $start_time)) until [[ $timeDiff -ge 10 ]]; do @@ -217,9 +218,12 @@ docker::prune_volumes() { if [[ -n $(docker ps -a -q --filter volume=$volume) ]]; then sleep 1 else - continue + shouldIgnore=false fi done + if $shouldIgnore; then + continue + fi fi log info "Waiting for volume $volume to be removed..." From 6c6ac4dd385770dc518882958ce3bbac94af8c00 Mon Sep 17 00:00:00 2001 From: michaelloosen Date: Fri, 5 May 2023 13:01:20 +0200 Subject: [PATCH 15/19] Update ansible users Cleanup for security --- .../inventories/development/group_vars/all.yml | 12 ++++++------ infrastructure/ansible/inventories/development/hosts | 6 +++--- infrastructure/ansible/inventories/production/hosts | 5 +++-- infrastructure/ansible/inventories/staging/hosts | 5 +++-- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/infrastructure/ansible/inventories/development/group_vars/all.yml b/infrastructure/ansible/inventories/development/group_vars/all.yml index c9317f08..ad00f74f 100644 --- a/infrastructure/ansible/inventories/development/group_vars/all.yml +++ b/infrastructure/ansible/inventories/development/group_vars/all.yml @@ -14,15 +14,15 @@ sudoers: key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINGNVNlWwpQKVXPSngEOOdJjuCyVEQoBXv+nHqmcM6vW - name: barry.dwyer@jembi.org username: barrydwyer - state: present + state: absent key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICw4vvV33xxrTzxAiPoRhuwyWUzmgrP5NPo2n4bmKx7P - name: mark.labuschagne@jembi.org username: marklabuschagne - state: present + state: absent key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHa1ghm9JsRl6JDtWU8AV+U70jehqlWaXmpjRg3afqB4 - name: castello.govender@jembi.org username: castellogovender - state: present + state: absent key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDWl3Vc+v0fiuVBIVTDehGGUgZqfvn0JG2oNS7oMV9X2s3p8VwndKm6/oa5bOO4+sp9Z/8ychvo7S2MNXBRQAzTEXo5Oej5E/aZqaFzvpjgI79cnSidIHTzOUw0rUk2EwpSCpJVSXCjSjxGLbbLI35+KltLVoNXGmpNFq4Xi7XwT9aXIm5KQcbumV1NFRGPl+XiaRHioo37gFtub9XjODdQFfs9KGMS2oEuzzFFaXj5unUDZo+lZlEp67HHwq6EpDLR5xf7l96xBvMpQ/MS2pTxCoHVqXx3IDL5CXBBrgUKS8lUuhPPUJxPeARz4DuU7SmWxhNwTDspAEROQ8Rsq6M+kvdslFVeJ4O5M2Rs75mDTUCAkmZTixkTMuMmWqBuQT3zPA7d8Gf0YLhKfwgyH8y5YeJgpU01o2wbH6em/n2isI+pSIatdUFQAKuFdzJiawQJEB5UobKwN2tKVP8ImjrfN+q8nuqHZwTTGW0AaCrb985aQFTgMbYwQeR3mkBNOE0= - name: lumiere@symbionix.co username: lumieremondo @@ -52,15 +52,15 @@ docker_users: key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINGNVNlWwpQKVXPSngEOOdJjuCyVEQoBXv+nHqmcM6vW - name: barry.dwyer@jembi.org username: barrydwyer - state: present + state: absent key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICw4vvV33xxrTzxAiPoRhuwyWUzmgrP5NPo2n4bmKx7P - name: mark.labuschagne@jembi.org username: marklabuschagne - state: present + state: absent key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHa1ghm9JsRl6JDtWU8AV+U70jehqlWaXmpjRg3afqB4 - name: castello.govender@jembi.org username: castellogovender - state: present + state: absent key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDWl3Vc+v0fiuVBIVTDehGGUgZqfvn0JG2oNS7oMV9X2s3p8VwndKm6/oa5bOO4+sp9Z/8ychvo7S2MNXBRQAzTEXo5Oej5E/aZqaFzvpjgI79cnSidIHTzOUw0rUk2EwpSCpJVSXCjSjxGLbbLI35+KltLVoNXGmpNFq4Xi7XwT9aXIm5KQcbumV1NFRGPl+XiaRHioo37gFtub9XjODdQFfs9KGMS2oEuzzFFaXj5unUDZo+lZlEp67HHwq6EpDLR5xf7l96xBvMpQ/MS2pTxCoHVqXx3IDL5CXBBrgUKS8lUuhPPUJxPeARz4DuU7SmWxhNwTDspAEROQ8Rsq6M+kvdslFVeJ4O5M2Rs75mDTUCAkmZTixkTMuMmWqBuQT3zPA7d8Gf0YLhKfwgyH8y5YeJgpU01o2wbH6em/n2isI+pSIatdUFQAKuFdzJiawQJEB5UobKwN2tKVP8ImjrfN+q8nuqHZwTTGW0AaCrb985aQFTgMbYwQeR3mkBNOE0= - name: lumiere@symbionix.co username: lumieremondo diff --git a/infrastructure/ansible/inventories/development/hosts b/infrastructure/ansible/inventories/development/hosts index 8ef9fd67..8ac3d61e 100644 --- a/infrastructure/ansible/inventories/development/hosts +++ b/infrastructure/ansible/inventories/development/hosts @@ -1,8 +1,8 @@ [leader] -13.244.111.91 name=node-1 +{ip_1} name=node-1 [managers] -13.244.239.144 name=node-2 -13.246.13.60 name=node-3 +{ip_2} name=node-2 +{ip_3} name=node-3 [workers] diff --git a/infrastructure/ansible/inventories/production/hosts b/infrastructure/ansible/inventories/production/hosts index 02f5d6d1..8ac3d61e 100644 --- a/infrastructure/ansible/inventories/production/hosts +++ b/infrastructure/ansible/inventories/production/hosts @@ -1,7 +1,8 @@ [leader] - +{ip_1} name=node-1 [managers] - +{ip_2} name=node-2 +{ip_3} name=node-3 [workers] diff --git a/infrastructure/ansible/inventories/staging/hosts b/infrastructure/ansible/inventories/staging/hosts index 02f5d6d1..8ac3d61e 100644 --- a/infrastructure/ansible/inventories/staging/hosts +++ b/infrastructure/ansible/inventories/staging/hosts @@ -1,7 +1,8 @@ [leader] - +{ip_1} name=node-1 [managers] - +{ip_2} name=node-2 +{ip_3} name=node-3 [workers] From 0405c4869a4a5c6adb97e576725ba7878deb42c8 Mon Sep 17 00:00:00 2001 From: michaelloosen Date: Fri, 5 May 2023 13:02:23 +0200 Subject: [PATCH 16/19] Update elastic connection string for logstash fix Logstash connection in cluster was broken --- .env.cluster | 2 +- .env.remote | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.cluster b/.env.cluster index 88c21c74..81765e82 100644 --- a/.env.cluster +++ b/.env.cluster @@ -35,7 +35,7 @@ INSECURE=false # Analytics Datastore - Elastic Search ES_HEAP_SIZE=-Xms8192m -Xmx8192m ES_LEADER_NODE=analytics-datastore-elastic-search-01 -ES_HOSTS="analytics-datastore-elastic-search-01:9200","analytics-datastore-elastic-search-02:9200","analytics-datastore-elastic-search-03:9200" +ES_HOSTS="\"analytics-datastore-elastic-search-01:9200","analytics-datastore-elastic-search-02:9200","analytics-datastore-elastic-search-03:9200\"" # Analytics Datastore - Clickhouse CLICKHOUSE_HOST=analytics-datastore-clickhouse-01 diff --git a/.env.remote b/.env.remote index d1b9a119..8dea7b25 100644 --- a/.env.remote +++ b/.env.remote @@ -10,7 +10,7 @@ MOCK_SERVER_PORT= POSTGRES_REPLICA_SET=postgres-1:5432,postgres-2:5432,postgres-3:5432 # Analytics Datastore - Elastic Search -ES_HOSTS="analytics-datastore-elastic-search-01:9200","analytics-datastore-elastic-search-02:9200","analytics-datastore-elastic-search-03:9200" +ES_HOSTS="\"analytics-datastore-elastic-search-01:9200","analytics-datastore-elastic-search-02:9200","analytics-datastore-elastic-search-03:9200\"" # Analytics Datastore - Clickhouse CLICKHOUSE_HOST=analytics-datastore-clickhouse-01 From 1c284bed9a978309f8505a8d7cc551c9a5868f5c Mon Sep 17 00:00:00 2001 From: michaelloosen Date: Fri, 5 May 2023 13:03:02 +0200 Subject: [PATCH 17/19] Fix casing in prune_volumes function Consistency --- utils/docker-utils.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/docker-utils.sh b/utils/docker-utils.sh index 77d5255a..6c960bbf 100644 --- a/utils/docker-utils.sh +++ b/utils/docker-utils.sh @@ -210,7 +210,7 @@ docker::prune_volumes() { # Ignore volumes attached to a container but are not apart of a service definition local start_time=$(date +%s) - local shouldIgnore=true + local should_ignore=true if [[ -n $(docker ps -a -q --filter volume=$volume) ]]; then local timeDiff=$(($(date +%s) - $start_time)) until [[ $timeDiff -ge 10 ]]; do @@ -218,10 +218,10 @@ docker::prune_volumes() { if [[ -n $(docker ps -a -q --filter volume=$volume) ]]; then sleep 1 else - shouldIgnore=false + should_ignore=false fi done - if $shouldIgnore; then + if $should_ignore; then continue fi fi From 687129aa87fa03d257531c3f75bae0c9fe88221e Mon Sep 17 00:00:00 2001 From: nour-borgi Date: Fri, 5 May 2023 13:56:56 +0100 Subject: [PATCH 18/19] Remove hostname from jempi-postgresql --- client-registry-jempi/docker-compose.api.yml | 1 + client-registry-jempi/docker-compose.combined.yml | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/client-registry-jempi/docker-compose.api.yml b/client-registry-jempi/docker-compose.api.yml index 19fed3c7..af57c17a 100644 --- a/client-registry-jempi/docker-compose.api.yml +++ b/client-registry-jempi/docker-compose.api.yml @@ -14,6 +14,7 @@ services: JEMPI_FILE_IMPORT_MAX_SIZE_BYTE: ${JEMPI_FILE_IMPORT_MAX_SIZE_BYTE} JEMPI_SESSION_SECURE: ${JEMPI_SESSION_SECURE} JEMPI_SESSION_DOMAIN_NAME: ${DOMAIN_NAME} + postgres.server: jempi-postgresql deploy: replicas: 1 resources: diff --git a/client-registry-jempi/docker-compose.combined.yml b/client-registry-jempi/docker-compose.combined.yml index 09eb69ee..d6e8b5ce 100644 --- a/client-registry-jempi/docker-compose.combined.yml +++ b/client-registry-jempi/docker-compose.combined.yml @@ -93,7 +93,6 @@ services: jempi-postgresql: image: bitnami/postgresql:15.2.0 - hostname: postgresql environment: POSTGRESQL_USERNAME: ${POSTGRESQL_USERNAME} POSTGRESQL_DATABASE: ${POSTGRESQL_DATABASE} From cac83cb639dc7e95536d936e5efb881d9a46b4fb Mon Sep 17 00:00:00 2001 From: Nour Borgi <48720958+nour-borgi@users.noreply.github.com> Date: Mon, 8 May 2023 13:46:01 +0100 Subject: [PATCH 19/19] Update docker-compose.combined-dev.yml --- client-registry-jempi/docker-compose.combined-dev.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client-registry-jempi/docker-compose.combined-dev.yml b/client-registry-jempi/docker-compose.combined-dev.yml index 5497a786..619144ce 100644 --- a/client-registry-jempi/docker-compose.combined-dev.yml +++ b/client-registry-jempi/docker-compose.combined-dev.yml @@ -24,6 +24,6 @@ services: jempi-postgresql: ports: - - published: 5432 - target: 5435 + - published: 5435 + target: 5432 mode: host