diff --git a/.env b/.env index 72e4992..0eed571 100644 --- a/.env +++ b/.env @@ -119,6 +119,12 @@ EMR_WEIGHT_CONCEPT= ODOO_ENABLE_EXTRA_CUSTOMER_FIELDS_ROUTE=false ODOO_ENABLE_EXTRA_QUOTATION_FIELDS_ROUTE=false +# EIP client Orthanc +EIP_DB_NAME_ORTHANC=openmrs_eip_mgt_orthanc +EIP_DB_USER_ORTHANC=openmrs_eip_mgt_orthanc +EIP_DB_PASSWORD_ORTHANC=password +DB_EVENT_DESTINATIONS_ORTHANC=direct:orthanc-event-listener + # EIP client ERPNext EIP_DB_NAME_ERPNEXT=openmrs_eip_mgt_erpnext EIP_DB_USER_ERPNEXT=openmrs_eip_mgt_erpnext @@ -153,6 +159,7 @@ EIP_OPENMRS_SENAITE_CONFIG_PATH= EIP_OPENMRS_SENAITE_ROUTES_PATH= EIP_ODOO_OPENMRS_PROPERTIES_PATH= EIP_ODOO_OPENMRS_ROUTES_PATH= +EIP_OPENMRS_ORTHANC_ROUTES_PATH= # Use the following volume to point to override database initialization scripts # Be careful when overriding this because the default scripts run essential configuration tasks needed by Ozone FOSS diff --git a/docker-compose-orthanc.yml b/docker-compose-orthanc.yml new file mode 100644 index 0000000..9dbf9cd --- /dev/null +++ b/docker-compose-orthanc.yml @@ -0,0 +1,83 @@ +services: + orthanc: + command: /run/secrets/ + secrets: + - orthanc.json # CAUTION: This is an experimental implementation, not for production use. + image: mekomsolutions/orthanc:latest + platform: linux/amd64 + restart: always + environment: + - ORTHANC_NAME=Orthanc + - ORTHANC_AUTHENTICATION=keycloak + - KEYCLOAK_REALM=orthanc + - KEYCLOAK_CLIENT_ID=orthanc + volumes: + - orthanc-db:/var/lib/orthanc/db + networks: + - ozone + - web + ports: + - "8889:8042" + + # Orthanc - OpenMRS integration service + eip-openmrs-orthanc: + depends_on: + env-substitution: + condition: service_completed_successfully + openmrs: + condition: service_healthy + mysql: + condition: service_started + orthanc: + condition: service_started + environment: + - EIP_DB_NAME_ORTHANC=${EIP_DB_NAME_ORTHANC} + - EIP_DB_USER_ORTHANC=${EIP_DB_USER_ORTHANC} + - EIP_DB_PASSWORD_ORTHANC=${EIP_DB_PASSWORD_ORTHANC} + - OPENMRS_URL=http://openmrs:8080/openmrs + - ORTHANC_URL=http://orthanc:8042 + - EIP_PROFILE=prod + - MYSQL_ADMIN_USER=root + - MYSQL_ADMIN_USER_PASSWORD=${MYSQL_ROOT_PASSWORD} + - OPENMRS_DB_HOST=${OPENMRS_DB_HOST} + - OPENMRS_DB_PORT=${OPENMRS_DB_PORT} + - OPENMRS_DB_NAME=${OPENMRS_DB_NAME} + - OPENMRS_DB_USER=${OPENMRS_DB_USER} + - OPENMRS_DB_PASSWORD=${OPENMRS_DB_PASSWORD} + - OPENMRS_USER=${OPENMRS_USER} + - OPENMRS_PASSWORD=${OPENMRS_PASSWORD} + - EIP_FHIR_RESOURCES= + - EIP_FHIR_SERVER_URL=http://openmrs:8080/openmrs/ws/fhir2/R4 + - EIP_FHIR_USERNAME=${OPENMRS_USER} + - EIP_FHIR_PASSWORD=${OPENMRS_PASSWORD} + - OPENMRS_USERNAME=${OPENMRS_USER} + - OPENMRS_PASSWORD=${OPENMRS_PASSWORD} + image: mekomsolutions/eip-client + networks: + ozone: + aliases: + - eip-openmrs-orthanc + restart: unless-stopped + volumes: + - "${EIP_OPENMRS_ORTHANC_ROUTES_PATH}:/eip-client/routes" + - eip-home-orthanc:/eip-home + + mysql: + environment: + EIP_DB_NAME_ORTHANC: ${EIP_DB_NAME_ORTHANC} + EIP_DB_USER_ORTHANC: ${EIP_DB_USER_ORTHANC} + EIP_DB_PASSWORD_ORTHANC: ${EIP_DB_PASSWORD_ORTHANC} + volumes: + - "${SQL_SCRIPTS_PATH}/mysql/eip-openmrs-orthanc:/docker-entrypoint-initdb.d/db/eip-openmrs-orthanc" + +secrets: + orthanc.json: + file: ${ORTHANC_CONFIG_PATH}/orthanc.json # CAUTION: This is an experimental implementation, not for production use. + +networks: + ozone: + web: + +volumes: + orthanc-db: + eip-home-orthanc: ~ diff --git a/scripts/utils.sh b/scripts/utils.sh index 0c8f25c..538fd1f 100644 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -42,6 +42,9 @@ function exportPaths () { export ERPNEXT_SCRIPTS_PATH=$DISTRO_PATH/binaries/erpnext/scripts/ export KEYCLOAK_CONFIG_PATH=$DISTRO_PATH/configs/keycloak export KEYCLOAK_BINARIES_PATH=$DISTRO_PATH/binaries/keycloak + export EIP_OPENMRS_ORTHANC_ROUTES_PATH=$DISTRO_PATH/binaries/eip-openmrs-orthanc + export ORTHANC_CONFIG_PATH=$DISTRO_PATH/configs/orthanc/initializer_config + echo "→ OPENMRS_CONFIG_PATH=$OPENMRS_CONFIG_PATH" echo "→ OPENMRS_PROPERTIES_PATH=$OPENMRS_PROPERTIES_PATH" @@ -62,6 +65,8 @@ function exportPaths () { echo "→ ERPNEXT_SCRIPTS_PATH=$ERPNEXT_SCRIPTS_PATH" echo "→ KEYCLOAK_CONFIG_PATH=$KEYCLOAK_CONFIG_PATH" echo "→ KEYCLOAK_BINARIES_PATH=$KEYCLOAK_BINARIES_PATH" + echo "→ EIP_OPENMRS_ORTHANC_ROUTES_PATH=$EIP_OPENMRS_ORTHANC_ROUTES_PATH" + echo "→ ORTHANC_CONFIG_PATH=$ORTHANC_CONFIG_PATH" }