Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
pmanko committed Dec 6, 2024
0 parents commit de5b437
Show file tree
Hide file tree
Showing 91 changed files with 11,944 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# modified configs
config_development.json
23 changes: 23 additions & 0 deletions .env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# General
CLUSTERED_MODE=false
VERSION=v0.0.1

# Log

DEBUG=1
BASHLOG_FILE=1
BASHLOG_FILE_PATH=platform.log

# Interoperability Layer - OpenHIM
OPENHIM_CORE_INSTANCES=1
OPENHIM_CONSOLE_INSTANCES=1
OPENHIM_MEDIATOR_API_PORT=443
MONGO_SET_COUNT=1
OPENHIM_MONGO_URL=mongodb://mongo-1:27017/openhim
OPENHIM_MONGO_ATNAURL=mongodb://mongo-1:27017/openhim

# iSantePlus and MySQL
MYSQL_ROOT_PASSWORD=change_for_prod!
OMRS_CONFIG_CONNECTION_USERNAME_1=openmrs
OMRS_CONFIG_CONNECTION_PASSWORD_1=change_for_prod!
OMRS_CONFIG_CONNECTION_URL_1=jdbc:mysql://mysql:3306/openmrs?autoReconnect=true
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
projects/isanteplus-db/initial-db/*.sql filter=lfs diff=lfs merge=lfs -text
*.omod filter=lfs diff=lfs merge=lfs -text
packages/database-mysql/config/initdb/*.sql filter=lfs diff=lfs merge=lfs -text
53 changes: 53 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

jobs:
init-project:
timeout-minutes: 60
runs-on: ubuntu-latest

steps:
-
name: Checkout
uses: actions/checkout@v4

-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Initialize docker swarm
run: docker swarm init

- name: Build local docker image of HIE
run: ./build-custom-images.sh

- name: Download instant CLI
run: ./get-cli.sh linux latest

- name: Boot up HIE
run: ./instant project init --env-file .env.hie

- name: Display container status
run: docker service ls

- name: Install Postman CLI
run: |
curl -o- "https://dl-cli.pstmn.io/install/linux64.sh" | sh
# - name: Login to Postman CLI
# run: postman login --with-api-key ${{ secrets.POSTMAN_API_KEY }}

# - name: Sleep for 250 seconds
# run: sleep 250
# shell: bash

- name: Stop containers
if: always()
run: ./instant project destroy
141 changes: 141 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.yarn
server/log

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directories used by tools like istanbul and nyc
coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
configs/shr/.env
configs/opencr-hapi/.env
configs/opencr/.env
configs/isanteplus/*.env

# next.js build output
.next

# MacOS specific files
.DS_Store
*.DS_Store

# Docker data volumes
**/data
!/projects/openhim-mediator-fhir-converter/data

# Production
/docs/build

# Generated files
/docs/.docusaurus
/docs/.cache-loader

# Built Go Binaries
platform-linux
platform.exe
platform-macos
instant-linux
instant.exe
instant-macos
instant

# Ignore the running script
.mk.sh

# Ignore OpenMRS modules + platform
openmrs
openmrs/*
docker/isanteplus/openmrs-runtime.properties

# VSCode
.vscode

# Config files
config_docker.json
tmpConfig.json

# IPython notebook checkpoints
*.ipynb_checkpoints
/openmrs/
*.ipynb_checkpoints/

# Vagrant
.vagrant

# Server key/cert examples for ansible
packaging/ansible/server_cert.pem
packaging/ansible/server_key.pem
server/certificates/server_cert.pem.bak
server/certificates/server_key.pem.bak

# Client key/cert examples for ansible
ansible_key.pem
ansible_cert.pem
ansible_csr.pem
ansible.p12

# HAPI properties
hapi.properties

# Configs for isanteplus
configs/isanteplus/custom_modules/*.omod
configs/isanteplus/db/*.sql

# Other
*.bak
parquet

isante-backup

dist

.tmp
2 changes: 2 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/azureSettings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/shared-health-record-poc.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions .postman/postman_env.ci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"id": "2432b862-e96d-4c54-8dd0-280091c4f4ad",
"name": "local",
"values": [
{
"key": "openhim-core-url",
"value": "https://openhim-core:8080",
"enabled": true
},
{
"key": "openhim-url",
"value": "https://openhim-core:5000",
"enabled": true
},
{
"key": "opencr-url",
"value": "http://opencr:3000",
"enabled": true
},
{
"key": "openhim-console-url",
"value": "http://openhim-console",
"enabled": true
},
{
"key": "isanteplus-url",
"value": "http://isanteplus:8080",
"enabled": true
}
],
"_postman_variable_scope": "environment",
"_postman_exported_at": "2021-12-08T04:56:15.104Z",
"_postman_exported_using": "Postman/9.3.1-211203-1700"
}
32 changes: 32 additions & 0 deletions .postman/run-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

docker-compose -f docker-compose.ports.yml up certgen

docker-compose -f docker-compose.ports.yml up -d nginx openhim-core openhim-console mongo-db

sleep 10

docker-compose -f docker-compose.ports.yml up openhim-config

docker-compose -f docker-compose.ports.yml up -d shr-fhir opencr-fhir opencr-es kafka zookeeper

sleep 30

docker-compose -f docker-compose.ports.yml up -d shr opencr

sleep 30

docker-compose -f docker-compose.ports.yml logs shr opencr

collections=(
'https://www.getpostman.com/collections/46fd37386092a9f460e4'
'https://www.getpostman.com/collections/4d682cbb222bb538d365'
'https://www.getpostman.com/collections/4f2328a2ce056ff876e4'
'https://www.getpostman.com/collections/0d397620f00804b00d75'
)

for collection in ${collections[@]}; do
echo $collection
export POSTMAN_COLLECTION=$collection
docker-compose -f docker-compose.ports.yml up newman
done
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
ARG PLATFORM_VERSION=latest

FROM jembi/platform:$PLATFORM_VERSION
ADD . /implementation

ADD ./utils /instant/utils

RUN chmod +x /implementation/scripts/cmd/override-configs/override-configs
RUN /implementation/scripts/cmd/override-configs/override-configs

Loading

0 comments on commit de5b437

Please sign in to comment.