diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 15a23a8..f5807e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,4 @@ # This is a basic workflow to help you get started with Actions - name: CI # Controls when the action will run. on: @@ -65,4 +64,4 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=inline,ref=user/app:buildcache - cache-to: type=inline,ref=user/app:buildcache,mode=max \ No newline at end of file + cache-to: type=inline,ref=user/app:buildcache,mode=max \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 5734be5..38b7233 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,15 +8,11 @@ ADD pom.xml ./ ADD src/main/resources ./src/main/resources RUN mvn verify --fail-never - - ADD src ./src -RUN mvn clean package -DskipTests +RUN mvn -DskipTests clean package FROM openjdk:8-jdk as run - COPY --from=build /app/target/mediator-xds-1.0.3-jar-with-dependencies.jar /mediator-xds-1.0.3-jar-with-dependencies.jar COPY --from=build /app/src/main/resources/mediator.properties /mediator.properties - -ENTRYPOINT java -jar /mediator-xds-1.0.3-jar-with-dependencies.jar --conf /mediator.properties +ENTRYPOINT java -jar /mediator-xds-1.0.3-jar-with-dependencies.jar --conf /mediator.properties \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index da495a7..4a177c6 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -3,7 +3,10 @@ services: xds-mediator: container_name: xds-mediator hostname: xds-mediator - image: xds-mediator:latest + image: ghcr.io/isanteplus/openhim-mediator-xds:local + ports: + - "8050:8050" + - "1044:1044" volumes: #data is the directory which you want to persist the generated parquet files - ../data:/tmp \ No newline at end of file diff --git a/src/main/resources/mediator-registration-info.json b/src/main/resources/mediator-registration-info.json new file mode 100644 index 0000000..9d274e0 --- /dev/null +++ b/src/main/resources/mediator-registration-info.json @@ -0,0 +1,46 @@ +{ + "urn": "urn:mediator:xds", + "version": "1.0.0", + "name": "OpenHIE XDS.b Mediator", + "description": "An XDS.b mediator for OpenHIE integration", + "endpoints": [ + { + "name": "XDS.b Mediator", + "host": "localhost", + "port": "8500", + "type": "http" + } + ], + "defaultChannelConfig": [ + { + "name": "XDS.b Mediator", + "urlPattern": "^/xds(registry|repository|brepository)$", + "type": "http", + "allow": ["xds,lnsp,xdsRole"], + "routes": [ + { + "name": "XDS.b Mediator", + "host": "localhost", + "port": "8500", + "type": "http", + "primary": "true" + } + ] + }, + { + "name": "XDS.b Mediator dsub", + "urlPattern": "^/dsub$", + "type": "http", + "allow": ["xds"], + "routes": [ + { + "name": "XDS.b Mediator - DSUB", + "host": "localhost", + "port": "8500", + "type": "http", + "primary": "true" + } + ] + } + ] +} diff --git a/src/main/resources/mediator.properties b/src/main/resources/mediator.properties index 2ce51e5..61c89b3 100644 --- a/src/main/resources/mediator.properties +++ b/src/main/resources/mediator.properties @@ -4,13 +4,13 @@ mediator.name=xds-mediator mediator.host=0.0.0.0 mediator.port=8500 mediator.timeout=60000 -mediator.mongo.host=mongodb +mediator.mongo.host=mongo-db mediator.mongo.port=27017 -core.host=localhost -core.api.port=8080 +core.host=openhim-api.sedish-haiti.org +core.api.port=443 core.api.user=root@openhim.org -core.api.password=openhim-password +core.api.password=openhim # Assigning authorities to resolve to during transaction enrichment client.requestedAssigningAuthority=http://openclientregistry.org/fhir/sourceid