From 69fdacbd621b77fa88fef47aa62f443f1629e963 Mon Sep 17 00:00:00 2001 From: corneliouzbett Date: Thu, 4 Jan 2024 16:24:43 +0300 Subject: [PATCH] OZ-348: Mount JAR camel routes + configs binary --- docker-compose-odoo.yml | 17 ++++++++++------- docker-compose-senaite.yml | 29 ++++++++++++++++++----------- eip.env | 20 ++++++++++++-------- scripts/utils.sh | 8 ++------ 4 files changed, 42 insertions(+), 32 deletions(-) diff --git a/docker-compose-odoo.yml b/docker-compose-odoo.yml index 142acd1..e933ab9 100644 --- a/docker-compose-odoo.yml +++ b/docker-compose-odoo.yml @@ -67,10 +67,10 @@ services: condition: service_started env_file: eip.env environment: - - DB_EVENT_DESTINATIONS=${DB_EVENT_DESTINATIONS_ODOO} - - EIP_DB_NAME=${EIP_DB_NAME_ODOO} - - EIP_DB_USER=${EIP_DB_USER_ODOO} - - EIP_DB_PASSWORD=${EIP_DB_PASSWORD_ODOO} + - DB_EVENT_DESTINATIONS_ODOO=${DB_EVENT_DESTINATIONS_ODOO} + - EIP_DB_NAME_ODOO=${EIP_DB_NAME_ODOO} + - EIP_DB_USER_ODOO=${EIP_DB_USER_ODOO} + - EIP_DB_PASSWORD_ODOO=${EIP_DB_PASSWORD_ODOO} - ODOO_DATABASE=${ODOO_DATABASE} - ODOO_USER=${ODOO_USER} - ODOO_PASSWORD=${ODOO_PASSWORD} @@ -79,10 +79,14 @@ services: - ODOO_CUSTOMER_DOB_FIELD=${ODOO_CUSTOMER_DOB_FIELD} - ODOO_CUSTOMER_WEIGHT_FIELD=${ODOO_CUSTOMER_WEIGHT_FIELD} - EMR_WEIGHT_CONCEPT=${EMR_WEIGHT_CONCEPT} + - OPENMRS_IDENTIFIER_TYPE_UUID=${OPENMRS_IDENTIFIER_TYPE_UUID} - ODOO_ENABLE_EXTRA_CUSTOMER_FIELDS_ROUTE=${ODOO_ENABLE_EXTRA_CUSTOMER_FIELDS_ROUTE} - ODOO_ENABLE_EXTRA_QUOTATION_FIELDS_ROUTE=${ODOO_ENABLE_EXTRA_QUOTATION_FIELDS_ROUTE} - ODOO_URL=http://odoo:8069 - image: mekomsolutions/eip-client + - OPENMRS_URL=http://openmrs:8080/openmrs + - EIP_PROFILE=prod + - EIP_WATCHED_TABLES=patient,person_name,person_address,patient_identifier,orders,test_order,drug_order + image: mekomsolutions/eip-client:2.0.0 networks: ozone: aliases: @@ -90,8 +94,7 @@ services: - eip-odoo-openmrs restart: unless-stopped volumes: - - "${EIP_ODOO_OPENMRS_PROPERTIES_PATH}:/config" - - "${EIP_ODOO_OPENMRS_ROUTES_PATH}:/routes" + - "${EIP_ODOO_OPENMRS_ROUTES_PATH}:/eip-client/routes" - eip-home-odoo:/eip-home postgresql: diff --git a/docker-compose-senaite.yml b/docker-compose-senaite.yml index 05a888a..04b5de1 100644 --- a/docker-compose-senaite.yml +++ b/docker-compose-senaite.yml @@ -38,23 +38,30 @@ services: condition: service_started env_file: eip.env environment: - - DB_EVENT_DESTINATIONS=${DB_EVENT_DESTINATIONS_SENAITE} - - SENAITE_USERNAME=${SENAITE_ADMIN_USER} - - SENAITE_PASSWORD=${SENAITE_ADMIN_PASSWORD} - - EIP_DB_NAME=${EIP_DB_NAME_SENAITE} - - EIP_DB_USER=${EIP_DB_USER_SENAITE} - - EIP_DB_PASSWORD=${EIP_DB_PASSWORD_SENAITE} + - SENAITE_SERVER_URL=https://${SENAITE_HOSTNAME}/senaite + - SENAITE_SERVER_USER=${SENAITE_ADMIN_USER} + - SENAITE_SERVER_PASSWORD=${SENAITE_ADMIN_PASSWORD} + - OPENMRS_SERVER_URL=http://openmrs:8080/openmrs + - OPENMRS_SERVER_USER=${OPENMRS_USER} + - OPENMRS_SERVER_PASSWORD=${OPENMRS_PASSWORD} + - OPENMRS_RESULTS_ENCOUNTER_TYPE_UUID=${RESULTS_ENCOUNTER_TYPE_UUID} + - OPENMRS_IDENTIFIER_TYPE_UUID=${OPENMRS_IDENTIFIER_TYPE_UUID} + - OPENMRS_CONCEPT_COMPLEX_UUID=${CONCEPT_COMPLEX_UUID} - BAHMNI_TEST_ORDER_TYPE_UUID=${BAHMNI_TEST_ORDER_TYPE_UUID} - - SENAITE_URL=http://senaite:8080 - image: mekomsolutions/eip-client + - EIP_PROFILE=prod + - EIP_WATCHED_TABLES=patient,person_name,person_address,patient_identifier,orders,test_order + - EIP_DB_NAME_SENAITE=${EIP_DB_NAME_SENAITE} + - EIP_DB_USER_SENAITE=${EIP_DB_USER_SENAITE} + - EIP_DB_PASSWORD_SENAITE=${EIP_DB_PASSWORD_SENAITE} + - DB_EVENT_DESTINATIONS_SENAITE=${DB_EVENT_DESTINATIONS_SENAITE} + image: mekomsolutions/eip-client:2.0.0 networks: ozone: aliases: - eip-client-senaite restart: unless-stopped volumes: - - "${EIP_OPENMRS_SENAITE_PROPERTIES_PATH}:/config" - - "${EIP_OPENMRS_SENAITE_ROUTES_PATH}:/routes" + - "${EIP_OPENMRS_SENAITE_ROUTES_PATH}:/eip-client/routes" - eip-home-senaite:/eip-home mysql: @@ -72,4 +79,4 @@ services: volumes: eip-home-senaite: ~ senaite-blobstorage: ~ - senaite-filestorage: ~ \ No newline at end of file + senaite-filestorage: ~ diff --git a/eip.env b/eip.env index 7250401..8b5a1bb 100644 --- a/eip.env +++ b/eip.env @@ -1,11 +1,21 @@ # -# OAuth2-related variables. Defaults to empty when not explicitly set in the environment. +# MySQL configuration +# +MYSQL_ADMIN_USER=root +MYSQL_ADMIN_USER_PASSWORD=${MYSQL_ROOT_PASSWORD} + +# +# Oauth2 configuration # OAUTH_CLIENT_SECRET=${OAUTH_CLIENT_SECRET:-} -OAUTH_ACCESS_TOKEN_URI=${OAUTH_ACCESS_TOKEN_URI:-} +OAUTH_ACCESS_TOKEN_URL=${OAUTH_ACCESS_TOKEN_URL:-} OAUTH_ENABLED=${OAUTH_ENABLED:-} OAUTH_CLIENT_ID=${OAUTH_CLIENT_ID:-} +OAUTH_CLIENT_SCOPE=${OAUTH_CLIENT_SCOPE:-} +# +# OpenMRS DB configuration +# OPENMRS_DB_HOST=${OPENMRS_DB_HOST} OPENMRS_DB_PORT=${OPENMRS_DB_PORT} OPENMRS_DB_NAME=${OPENMRS_DB_NAME} @@ -13,9 +23,3 @@ OPENMRS_DB_USER=${OPENMRS_DB_USER} OPENMRS_DB_PASSWORD=${OPENMRS_DB_PASSWORD} OPENMRS_USER=${OPENMRS_USER} OPENMRS_PASSWORD=${OPENMRS_PASSWORD} -MYSQL_ADMIN_USER=root -MYSQL_ADMIN_USER_PASSWORD=${MYSQL_ROOT_PASSWORD} -RESULTS_ENCOUNTER_TYPE_UUID=${RESULTS_ENCOUNTER_TYPE_UUID} -CONCEPT_COMPLEX_UUID=${CONCEPT_COMPLEX_UUID} -OPENMRS_IDENTIFIER_TYPE_UUID=${OPENMRS_IDENTIFIER_TYPE_UUID} -OPENMRS_URL=http://openmrs:8080 \ No newline at end of file diff --git a/scripts/utils.sh b/scripts/utils.sh index 3b04471..c40e58e 100644 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -28,10 +28,8 @@ function exportPaths () { export ODOO_EXTRA_ADDONS=$DISTRO_PATH/binaries/odoo/addons export ODOO_CONFIG_PATH=$DISTRO_PATH/configs/odoo/initializer_config/ export ODOO_CONFIG_FILE_PATH=$DISTRO_PATH/configs/odoo/config/odoo.conf - export EIP_ODOO_OPENMRS_ROUTES_PATH=$DISTRO_PATH/binaries/eip-odoo-openmrs/routes - export EIP_ODOO_OPENMRS_PROPERTIES_PATH=$DISTRO_PATH/configs/eip-odoo-openmrs/properties - export EIP_OPENMRS_SENAITE_ROUTES_PATH=$DISTRO_PATH/binaries/eip-openmrs-senaite/routes - export EIP_OPENMRS_SENAITE_PROPERTIES_PATH=$DISTRO_PATH/configs/eip-openmrs-senaite/properties + export EIP_ODOO_OPENMRS_ROUTES_PATH=$DISTRO_PATH/binaries/eip-odoo-openmrs + export EIP_OPENMRS_SENAITE_ROUTES_PATH=$DISTRO_PATH/binaries/eip-openmrs-senaite export OPENMRS_FRONTEND_CONFIG_PATH=$DISTRO_PATH/configs/openmrs/frontend_config/ export SQL_SCRIPTS_PATH=$DISTRO_PATH/data/ export SUPERSET_CONFIG_PATH=$DISTRO_PATH/configs/superset/ @@ -45,9 +43,7 @@ function exportPaths () { echo "→ ODOO_CONFIG_PATH=$ODOO_CONFIG_PATH" echo "→ ODOO_CONFIG_FILE_PATH=$ODOO_CONFIG_FILE_PATH" echo "→ EIP_ODOO_OPENMRS_ROUTES_PATH=$EIP_ODOO_OPENMRS_ROUTES_PATH" - echo "→ EIP_ODOO_OPENMRS_PROPERTIES_PATH=$EIP_ODOO_OPENMRS_PROPERTIES_PATH" echo "→ EIP_OPENMRS_SENAITE_ROUTES_PATH=$EIP_OPENMRS_SENAITE_ROUTES_PATH" - echo "→ EIP_OPENMRS_SENAITE_PROPERTIES_PATH=$EIP_OPENMRS_SENAITE_PROPERTIES_PATH" echo "→ OPENMRS_FRONTEND_CONFIG_PATH=$OPENMRS_FRONTEND_CONFIG_PATH" echo "→ SQL_SCRIPTS_PATH=$SQL_SCRIPTS_PATH" echo "→ SUPERSET_CONFIG_PATH=$SUPERSET_CONFIG_PATH"