Skip to content

Commit

Permalink
Fixes mllp ip address for #29 (#30)
Browse files Browse the repository at this point in the history
* Fixes for #29

* Re-enable mllp tests
  • Loading branch information
pmanko authored Dec 10, 2021
1 parent cad4f89 commit ed57ed7
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ jobs:
POSTMAN_COLLECTION: https://www.getpostman.com/collections/2ee8ebff39c078bac256
run: docker-compose -f ci.docker-compose.yml up --exit-code-from newman newman

# - name: Run MLLP Tests
# run: docker-compose -f ci.docker-compose.yml up --exit-code-from mllp_tests mllp_tests
- name: Run MLLP Tests
run: docker-compose -f ci.docker-compose.yml up --exit-code-from mllp_tests mllp_tests

- name: Show SHR Log
run: docker-compose -f "ci.docker-compose.yml" logs shr
Expand Down
39 changes: 23 additions & 16 deletions ci.docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,19 @@ services:
image: test-image:latest
environment:
- NODE_ENV=docker
ports:
- 3001:3001
volumes:
- ./config/config_ci.json:/app/config/config_docker.json
- ./config/mediator_ci.json:/app/config/mediator_docker.json

networks:
- test
shr-fhir:
image: hapiproject/hapi:latest
hostname: shr-fhir
restart: unless-stopped
ports:
- "8081:8080"
volumes:
- hapi-data:/data/hapi

networks:
- test
###
# OpenHIM
###
Expand All @@ -38,26 +36,28 @@ services:
- 8080:8080
- 5000:5000
- 5001:5001
networks:
- test
healthcheck:
test: "curl -sSk https://localhost:8080/heartbeat || exit 1"
interval: 30s
timeout: 30s
retries: 3
mongo-db:
image: mongo:3.4
ports:
- 27017:27017
volumes:
- "mongo-data:/data/db"
restart: unless-stopped

networks:
- test
# OpenHIM Config
openhim-config:
container_name: openhim-config
image: ghcr.io/i-tech-uw/openhim-config:v0.0.0
volumes:
- ./config/openhim/ci-openhim-config.json:/app/test-openhim-config.json

networks:
- test
# Newman Tests
newman:
image: postman/newman
Expand All @@ -66,26 +66,28 @@ services:
volumes:
- ./.postman:/.postman
entrypoint: newman run $POSTMAN_COLLECTION -e /.postman/ci.postman_environment.json --insecure --timeout-request 10000 --delay-request 10000

networks:
- test
# MLLP Tests
mllp_tests:
container_name: mllp_tests
image: ghcr.io/b-techbw/mllp-tester:main
volumes:
- ./test/mllp:/test

networks:
- test
# Task Runner
zookeeper:
image: 'bitnami/zookeeper:latest'
hostname: zookeeper
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
networks:
- test
kafka:
image: 'bitnami/kafka:latest'
hostname: kafka
container_name: kafka
ports:
- 9092:9092
environment:
- KAFKA_BROKER_ID=1
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092
Expand All @@ -97,7 +99,8 @@ services:
- kafka-data:/bitnami/kafka
depends_on:
- zookeeper

networks:
- test
# Not necessary
openhim-console:
image: jembi/openhim-console:latest
Expand All @@ -111,8 +114,12 @@ services:
interval: 30s
timeout: 30s
retries: 3

networks:
- test
volumes:
mongo-data:
hapi-data:
kafka-data:

networks:
test:
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "shared-health-registry",
"version": "0.4.2",
"version": "0.4.3",
"description": "Open Implementation of an OpenHIE Shared Health Record",
"main": "app.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/server/mllpAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const hl7 = require('hl7')
export default class MllpAdapter {

start(callback: Function) {
let mllpServer = new MllpServer("localhost", config.get('app:mllpPort'), logger)
let mllpServer = new MllpServer("0.0.0.0", config.get('app:mllpPort'), logger)

mllpServer.listen((err: Error) => callback())

Expand Down

0 comments on commit ed57ed7

Please sign in to comment.