Skip to content

Commit

Permalink
Docker setup improvements and cleanup (#32)
Browse files Browse the repository at this point in the history
* Cleaned up docker-compose files for more clarity

* Workflow fix

* Name fixes

* Network fix
  • Loading branch information
pmanko authored Apr 13, 2022
1 parent 7bdd672 commit bc5ff03
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 586 deletions.
13 changes: 1 addition & 12 deletions .env
Original file line number Diff line number Diff line change
@@ -1,13 +1,2 @@
# Port Assignments
CR_PORT=3000
OPENHIM_CONSOLE_PORT=3001
SHR_PORT=3002

SHR_FHIR_PORT=8082
CR_FHIR_PORT=8081

CR_ES_PORT=9200
OPENHIM_PORT=9201

SHR_VERSION=v0.4.4
SHR_VERSION=v0.5.2
FHIR_CONVERTER_VERSION=v3.1.4
45 changes: 25 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
build-test:
timeout-minutes: 10
timeout-minutes: 20
runs-on: ubuntu-latest

steps:
Expand All @@ -19,56 +19,61 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

-
name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ secrets.GHCR_USER }}
password: ${{ secrets.GHCR_TOKEN }}

- name: Pull containers
run: COMPOSE_PROFILES=mediators,support,test,config docker-compose -f docker-compose.ci.yml pull
run: docker-compose pull

- name: Cache containers
uses: satackey/[email protected]
continue-on-error: true

- name: Start support containers
run: docker-compose -f docker-compose.ci.yml --profile support up -d
run: docker-compose up -d

- name: Sleep for 120 seconds
run: sleep 120
- name: Sleep for 150 seconds
run: sleep 150
shell: bash

- name: Display docker logs for openhim config
run: docker-compose -f docker-compose.ci.yml logs openhim-config

- name: Start other mediators
run: docker-compose -f docker-compose.ci.yml --profile mediators up -d

- name: Sleep for 30 seconds
run: sleep 30
shell: bash
run: docker-compose logs openhim-config

- name: Display container status
run: COMPOSE_PROFILES=mediators,support,test,config docker-compose -f docker-compose.ci.yml ps
run: docker-compose ps

- name: Display logs
run: docker-compose -f docker-compose.ci.yml --profile mediators logs
run: docker-compose logs shr opencr fhir-converter

- name: Run General Tests https://www.postman.com/itechuw/workspace/botswana-hie/collection/1525496-77f89792-c73b-4c75-a450-5cb6f79230d4)
env:
POSTMAN_COLLECTION: /.postman/collections/1_general_tests.postman_collection.json
run: docker-compose --profile test -f docker-compose.ci.yml up --exit-code-from newman newman
run: docker-compose -f docker-compose.test.yml up --exit-code-from newman newman

- name: Run CR Tests (https://www.postman.com/itechuw/workspace/botswana-hie/collection/1525496-16a5a3c2-719f-40a6-ad06-a9530d3f2006)
env:
POSTMAN_COLLECTION: /.postman/collections/2_cr_workflows.postman_collection.json
run: docker-compose --profile test -f docker-compose.ci.yml up --exit-code-from newman newman
run: docker-compose -f docker-compose.test.yml up --exit-code-from newman newman

- name: Run Laboratory Tests (https://www.postman.com/itechuw/workspace/botswana-hie/collection/1525496-db80feab-8a77-42c8-aa7e-fd4beb0ae6a8)
env:
POSTMAN_COLLECTION: /.postman/collections/3_lab_workflows.postman_collection.json
run: docker-compose --profile test -f docker-compose.ci.yml up --exit-code-from newman newman
run: docker-compose -f docker-compose.test.yml up --exit-code-from newman newman

- name: Run HL7 <--> FHIR Tests (https://openme.postman.co/workspace/Botswana-HIE~bf140db5-85f6-4470-bc3a-511efcda80ba/collection/1525496-6ae2c5fc-f659-4bc3-8fe0-18b07ab5e57a)
env:
POSTMAN_COLLECTION: /.postman/collections/4_hl7_conversion.postman_collection.json
run: docker-compose --profile test -f docker-compose.ci.yml up --exit-code-from newman newman
run: docker-compose -f docker-compose.test.yml up --exit-code-from newman newman

- name: Display logs
if: always()
run: docker-compose logs shr opencr fhir-converter openhim-core

- name: Stop containers
if: always()
run: docker-compose --profile test -f docker-compose.ci.yml down
run: docker-compose down -v
1 change: 1 addition & 0 deletions docker-compose.cadvisor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ services:
networks:
hie:
external: true
name: hie-botswana_hie

266 changes: 0 additions & 266 deletions docker-compose.ci.yml

This file was deleted.

Loading

0 comments on commit bc5ff03

Please sign in to comment.