Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OZ-702: [TEST] Analysing Orthanc #119

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,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
Expand Down Expand Up @@ -130,6 +136,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
Expand Down
36 changes: 36 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Use the base Orthanc plugins image
FROM jodogne/orthanc-plugins:latest

RUN apt-get update && apt-get install -y openjdk-17-jdk cmake build-essential python3 unzip libjsoncpp-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64

WORKDIR /home/root/
RUN wget -qO- https://orthanc.uclouvain.be/downloads/sources/orthanc-java/OrthancJava-1.0.tar.gz | tar xvz

WORKDIR /home/root/OrthancJava-1.0
RUN mkdir BuildPlugin && \
cd BuildPlugin && \
cmake ../Plugin -DCMAKE_BUILD_TYPE=Release && \
make

WORKDIR /home/root/OrthancJava-1.0
RUN mkdir BuildJavaSDK && \
cd BuildJavaSDK && \
cmake ../JavaSDK && \
make

WORKDIR /home/root/
RUN wget https://orthanc.uclouvain.be/downloads/cross-platform/orthanc-java/mainline/OrthancFHIR.jar

COPY java/HelloWorld.java /home/root/java/
WORKDIR /home/root/java/
RUN javac -cp /home/root/OrthancJava-1.0/BuildJavaSDK/OrthancJavaSDK.jar HelloWorld.java

# Expose Orthanc default port
EXPOSE 4242 8042

ENV LD_PRELOAD=/usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so
ENTRYPOINT ["/usr/local/sbin/Orthanc"]
105 changes: 105 additions & 0 deletions docker-compose-orthanc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
version: "3.8"

services:
orthanc:
command: /run/secrets/
secrets:
- orthanc.json
image: sidvaish97/orthanc_test:v1.0
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"
# depends_on:
# env-substitution:
# condition: service_completed_successfully

# keycloak:
# image: orthancteam/orthanc-keycloak:latest
# restart: always
# ports:
# - "8080:8080"
# environment:
# - ORTHANC__USER__NAME=orthanc
# - ORTHANC__USER__PASSWORD=orthanc
# - KC_DB="postgresql"
# - KC_DB_URL="jdbc:postgresql://postgres:5432/keycloak"
# - KC_DB_USERNAME="orthanc"
# - KC_DB_PASSWORD="orthanc"
# networks:
# - ozone
# - web

# env-substitution:
# environment:
# - ORTHANC_PUBLIC_URL=http://${ORTHANC_HOSTNAME}

# 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
- 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}
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.json

networks:
ozone:
web:

volumes:
orthanc-db:
eip-home-orthanc: ~
Empty file added java/HelloWorld.java
Empty file.
Loading