Skip to content

Commit

Permalink
OZ-708: Add fhir-odoo sidecar service (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
corneliouzbett authored Oct 15, 2024
1 parent bcb5eb6 commit 84234fe
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,4 @@ O3_HOSTNAME=emr-172-17-0-1.traefik.me
ODOO_HOSTNAME=erp-172-17-0-1.traefik.me
SENAITE_HOSTNAME=lims-172-17-0-1.traefik.me
ERPNEXT_HOSTNAME=erpnext-172-17-0-1.traefik.me
FHIR_ODOO_HOSTNAME=fhir-erp-172-17-0-1.traefik.me
29 changes: 28 additions & 1 deletion docker-compose-odoo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,31 @@ services:
volumes:
- "${EIP_ODOO_OPENMRS_ROUTES_PATH}:/eip-client/routes"
- eip-home-odoo:/eip-home


fhir-odoo:
depends_on:
env-substitution:
condition: service_completed_successfully
odoo:
condition: service_started
environment:
- ODOO_HOST=http://odoo
- ODOO_PORT=8069
- ODOO_DATABASE=${ODOO_DATABASE}
image: mekomsolutions/fhir-odoo
labels:
traefik.enable: "true"
traefik.http.routers.fhir-erp.rule: "Host(`${FHIR_ODOO_HOSTNAME}`)"
traefik.http.routers.fhir-erp.entrypoints: "websecure"
traefik.http.services.fhir-erp.loadbalancer.server.port: 8080
networks:
ozone:
aliases:
- fhir-erp
- fhir-odoo
- odoo-fhir-facade
restart: unless-stopped

postgresql:
environment:
ODOO_DB_NAME: ${ODOO_DATABASE}
Expand All @@ -118,6 +142,9 @@ services:
env-substitution:
environment:
- ODOO_PUBLIC_URL=${SERVER_SCHEME}://${ODOO_HOSTNAME}
- EXTERNAL_FHIR_API_URL=http://fhir-odoo:8080/odoo/fhir/R4
- EXTERNAL_FHIR_API_USERNAME=${ODOO_USER}
- EXTERNAL_FHIR_API_PASSWORD=${ODOO_PASSWORD}

volumes:
eip-home-odoo: ~
Expand Down
1 change: 1 addition & 0 deletions docker-compose-openmrs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ services:
- "${OPENMRS_CONFIG_PATH:-openmrs-config}:/openmrs/distribution/openmrs_config/"
- "${OPENMRS_CONFIG_CHECKSUMS_PATH:-openmrs-config-checksums}:/openmrs/data/configuration_checksums"
- "${OPENMRS_PROPERTIES_PATH}:/etc/properties/"
- "${OPENMRS_PROPERTIES_PATH}/fhirproxy.properties:/openmrs/data/fhirproxy/config.properties"

# OpenMRS 3 Frontend
frontend:
Expand Down
9 changes: 9 additions & 0 deletions proxy/default.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,12 @@ server {
proxy_pass http://$erpnext;
}
}

server {
listen 8083;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://fhir-odoo:8080;
}
}
1 change: 1 addition & 0 deletions proxy/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ services:
- "8081:8081"
- "8088:8088"
- "8082:8082"
- "8083:8083"
volumes:
- "./confs:/usr/local/apache2/conf/extra"
- "${PROXY_TLS_CERTS_PATH:-proxy-tls-certs}:/etc/tls"
Expand Down
4 changes: 4 additions & 0 deletions scripts/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,12 @@ function setTraefikHostnames {
export ODOO_HOSTNAME=erp-"${IP_WITH_DASHES}.traefik.me"
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"
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"

}

Expand All @@ -123,10 +125,12 @@ function setNginxHostnames {
export ODOO_HOSTNAME="localhost:8069"
export SENAITE_HOSTNAME="localhost:8081"
export ERPNEXT_HOSTNAME="localhost:8082"
export FHIR_ODOO_HOSTNAME="localhost:8083"
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"

}

Expand Down

0 comments on commit 84234fe

Please sign in to comment.