Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerized #3

Merged
merged 5 commits into from
Nov 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# We'll let Git's auto-detection algorithm infer if a file is text. If it is,
# enforce LF line endings regardless of OS or git configurations.
* text=auto eol=lf

# Force bash scripts to always use LF line endings so that if a repo is accessed
# in Unix via a file share from Windows, the scripts will work.
*.sh text eol=lf
44 changes: 44 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This workflow will setup IG publisher, run sushi
# It should also publish results (TBD)

name: Node.js CI

on:
push:
branches: [ "main" ]
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
build:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup IG publisher
run: docker-compose run runner bash -c "cd /workdir && chmod +x ./_updatePublisher.sh && ./_updatePublisher.sh --yes"
- name: Generate
run: docker-compose run runner bash -c "cd /workdir && chmod +x ./_genonce.sh && ./_genonce.sh"
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: './output'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM node:lts-bullseye
RUN npm install -g fsh-sushi

RUN apt-get update && apt-get -y install openjdk-17-jdk-headless ruby-full build-essential zlib1g-dev
RUN gem install jekyll bundler
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,30 @@ The profiles will be based on R4, [FHIR 4.0.1](http://hl7.org/fhir/R4/).
(*) The work has started with Patient, Practitioner, and Organization. These should support the implementation guide for SMART App Launch.

(?) Profiling device and medication related resources will be started if we identify implementers who have used these resources and feel there is a need for profiling. Sensotrend uses MedicationAdministration, in Finland with the Kanta PHR, but sees no need for a Finnish profile.


## Required tools
* NodeJS 18
* Java 17
* Jekyll (ruby)

Or you can use docker, see [Dockerfile](Dockerfile).

## Quick start

With requirements installed locally:

``` bash
./_updatePublisher.sh --yes
./_genonce.sh
```


With docker:

``` bash
docker-compose run runner bash -c "cd /workdir && ./_updatePublisher.sh --yes"
docker-compose run runner bash -c "cd /workdir && ./_genonce.sh"
```

Html output will be generated to `output/StructureDefinition-FinnishCorePatient.html`.
8 changes: 8 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: '3.7'
services:
runner:
build:
context: .
dockerfile: Dockerfile
volumes:
- ./:/workdir