Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
Copy over the existing logic that we can reuse from the instant repo as our starting point.
  • Loading branch information
michaelloosen committed Dec 20, 2021
1 parent b0e0d30 commit 5009e2c
Show file tree
Hide file tree
Showing 328 changed files with 722,093 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# docker volume data folders
**/data

# cli client
goinstant
./deploy.sh

# vscode config
.vscode

# Docs
docs

# Dependency directories
node_modules/
.editorconfig
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
root = true

[*]
end_of_line = lf
indent_style = space
indent_size = 2
charset = utf-8
27 changes: 27 additions & 0 deletions .env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Test environment vars for local deployment
OPENHIM_API_HOSTNAME=openhim-core
OPENHIM_TRANSACTION_API_PORT=5001
OPENHIM_MEDIATOR_API_PORT=8080
MOCK_SERVER_HOST=mock-service
MOCK_SERVER_PORT=4000

# DHIS details
DHIS2_PROTOCOL=http
DHIS2_API_HOSTNAME=dhis-web
DHIS2_API_PASSWORD=district
DHIS2_API_PORT=8080
DHIS2_API_USERNAME=admin

# ANALYTICS package
ANALYTICS_PROTOCOL=http
ES_ANALYTICS_HOSTNAME=es-analytics
KIBANA_HOSTNAME=kibana
KIBANA_API_PORT=5601
ES_ANALYTICS_API_PORT=9200

# ELASTIC Pipeline
PIPELINE_PROTOCOL=http
FHIR_EXTRACTOR_HOSTNAME=fhir-extractor
LOGSTASH_HOSTNAME=logstash
FHIR_EXTRACTOR_API_PORT=3000
LOGSTASH_API_PORT=5055
27 changes: 27 additions & 0 deletions .env.remote
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Test environment vars for remote deployment - change the values below to point to your deployed instances
OPENHIM_API_HOSTNAME=<openhim_hostname>
OPENHIM_TRANSACTION_API_PORT=<port>
OPENHIM_MEDIATOR_API_PORT=<openhim_api_port>
MOCK_SERVER_HOST=<mock_service_hostname>
MOCK_SERVER_PORT=<port>

# DHIS details
DHIS2_PROTOCOL=http
DHIS2_API_HOSTNAME=<hostname>
DHIS2_API_PASSWORD=district
DHIS2_API_PORT=<port>
DHIS2_API_USERNAME=admin

# ANALYTICS package
ANALYTICS_PROTOCOL=http
ES_ANALYTICS_HOSTNAME=<hostname>
KIBANA_HOSTNAME=<hostname>
KIBANA_API_PORT=<port>
ES_ANALYTICS_API_PORT=<port>

# ELASTIC Pipeline
PIPELINE_PROTOCOL=http
FHIR_EXTRACTOR_HOSTNAME=<hostname>
LOGSTASH_HOSTNAME=<hostname>
FHIR_EXTRACTOR_API_PORT=<port>
LOGSTASH_API_PORT=<port>
31 changes: 31 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Create go binaries for linux, windows and mac

on:
release:
types:
- created

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17

- name: Build Releases
run: cd ./goinstant && ./buildreleases.sh

- name: Test binaries
run: ./goinstant/bin/goinstant-linux help

- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
./goinstant/bin/goinstant-linux
./goinstant/bin/goinstant-macos
./goinstant/bin/goinstant.exe
85 changes: 85 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# go-instant
*-packr.go
packrd
goinstant/bin/goinstant*
goinstant/data
goinstant/hapi.properties
goinstant/pkged.go

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

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

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

# Coverage directory used by tools like istanbul
coverage

# nyc test 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

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

# 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

# next.js build output
.next

# mac
.DS_Store

# docker data volumes
**/data

# production
/docs/build

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

# vscode config
.vscode
21 changes: 21 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"arrowParens": "always",
"bracketSpacing": true,
"endOfLine": "lf",
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"jsxBracketSameLine": false,
"jsxSingleQuote": false,
"printWidth": 80,
"proseWrap": "preserve",
"quoteProps": "as-needed",
"requirePragma": false,
"semi": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "none",
"useTabs": false,
"vueIndentScriptAndStyle": false,
"filepath": "/home/ryan/git/instant/instant.ts",
"parser": "typescript"
}
35 changes: 35 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM node:fermium-buster

WORKDIR /instant

# install curl
RUN apt-get update; apt-get install -y curl

# install kubectl
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
RUN chmod +x ./kubectl
RUN mv ./kubectl /usr/local/bin/kubectl

# install docker engine
RUN curl -sSL https://get.docker.com/ | sh

# install docker-compose binary
RUN curl -L "https://github.com/docker/compose/releases/download/1.25.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
RUN chmod +x /usr/local/bin/docker-compose

# install aws cli - for credential fetching
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
RUN unzip awscliv2.zip
RUN ./aws/install

# remove orphan container warning
ENV COMPOSE_IGNORE_ORPHANS=1

# install node deps
ADD package.json .
ADD yarn.lock .
RUN yarn

ADD . .

ENTRYPOINT [ "yarn", "instant" ]
Loading

0 comments on commit 5009e2c

Please sign in to comment.