Skip to content

Commit

Permalink
OZ-708: Add fhir-odoo sidecar service
Browse files Browse the repository at this point in the history
  • Loading branch information
corneliouzbett committed Sep 24, 2024
1 parent 3441afb commit 3d60783
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 0 deletions.
27 changes: 27 additions & 0 deletions docker-compose-odoo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,30 @@ 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=odoo
- ODOO_PORT=8069
- ODOO_RPC_PROTOCOL=${ODOO_RPC_PROTOCOL}
- ODOO_DATABASE=${ODOO_DATABASE}
image: mekomsolutions/fhir-odoo
labels:
traefik.enable: "true"
traefik.http.routers.fhir-odoo.rule: "Host(`${FHIR_ODOO_HOSTNAME}`)"
traefik.http.routers.fhir-odoo.entrypoints: "websecure"
traefik.http.services.fhir-odoo.loadbalancer.server.port: 8080
networks:
ozone:
aliases:
- fhir-odoo
- odoo-fhir-facade
restart: unless-stopped

postgresql:
environment:
Expand All @@ -118,6 +142,9 @@ services:
env-substitution:
environment:
- ODOO_PUBLIC_URL=https://${ODOO_HOSTNAME}
- FHIR_ODOO_PUBLIC_URL=${ODOO_RPC_PROTOCOL}://${FHIR_ODOO_HOSTNAME}
- ODOO_USER=${ODOO_USER}
- ODOO_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}/fhir-proxy.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
8 changes: 8 additions & 0 deletions scripts/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,14 @@ 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"
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"

}

Expand All @@ -120,10 +124,14 @@ function setNginxHostnames {
export ODOO_HOSTNAME="localhost:8069"
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"

}

Expand Down

0 comments on commit 3d60783

Please sign in to comment.