From 5801b3e8a04ade758597b66db797cba0d74ebacb Mon Sep 17 00:00:00 2001 From: "Kipchumba C. Bett" Date: Tue, 1 Oct 2024 09:43:34 +0300 Subject: [PATCH] Use internal url & infer RPC_PROTOCOL from the host --- docker-compose-odoo.yml | 5 ++--- scripts/utils.sh | 4 ---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/docker-compose-odoo.yml b/docker-compose-odoo.yml index 496d81b..e4d604f 100644 --- a/docker-compose-odoo.yml +++ b/docker-compose-odoo.yml @@ -106,9 +106,8 @@ services: odoo: condition: service_started environment: - - ODOO_HOST=odoo + - ODOO_HOST=http://odoo - ODOO_PORT=8069 - - ODOO_RPC_PROTOCOL=${ODOO_RPC_PROTOCOL} - ODOO_DATABASE=${ODOO_DATABASE} image: mekomsolutions/fhir-odoo labels: @@ -142,7 +141,7 @@ services: env-substitution: environment: - ODOO_PUBLIC_URL=https://${ODOO_HOSTNAME} - - EXTERNAL_FHIR_API_URL=${ODOO_RPC_PROTOCOL}://${FHIR_ODOO_HOSTNAME}/odoo/fhir/R4 + - EXTERNAL_FHIR_API_URL=http://fhir-odoo:8080/odoo/fhir/R4 - EXTERNAL_FHIR_API_USERNAME=${ODOO_USER} - EXTERNAL_FHIR_API_PASSWORD=${ODOO_PASSWORD} diff --git a/scripts/utils.sh b/scripts/utils.sh index c651d1a..8693f26 100644 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -107,13 +107,11 @@ function setTraefikHostnames { export SENAITE_HOSTNAME=lims-"${IP_WITH_DASHES}.traefik.me" export ERPNEXT_HOSTNAME=erpnext-"${IP_WITH_DASHES}.traefik.me" export FHIR_ODOO_HOSTNAME=fhir-erp-"${IP_WITH_DASHES}.traefik.me" - export ODOO_RPC_PROTOCOL="https" echo "→ O3_HOSTNAME=$O3_HOSTNAME" echo "→ ODOO_HOSTNAME=$ODOO_HOSTNAME" echo "→ SENAITE_HOSTNAME=$SENAITE_HOSTNAME" echo "→ ERPNEXT_HOSTNAME=$ERPNEXT_HOSTNAME" echo "→ FHIR_ODOO_HOSTNAME=$FHIR_ODOO_HOSTNAME" - echo "→ ODOO_RPC_PROTOCOL=$ODOO_RPC_PROTOCOL" } @@ -125,13 +123,11 @@ function setNginxHostnames { export SENAITE_HOSTNAME="localhost:8081" export ERPNEXT_HOSTNAME="localhost:8082" export FHIR_ODOO_HOSTNAME="localhost:8083" - export ODOO_RPC_PROTOCOL="http" echo "→ O3_HOSTNAME=$O3_HOSTNAME" echo "→ ODOO_HOSTNAME=$ODOO_HOSTNAME" echo "→ SENAITE_HOSTNAME=$SENAITE_HOSTNAME" echo "→ ERPNEXT_HOSTNAME=$ERPNEXT_HOSTNAME" echo "→ FHIR_ODOO_HOSTNAME=$FHIR_ODOO_HOSTNAME" - echo "→ ODOO_RPC_PROTOCOL=$ODOO_RPC_PROTOCOL" }