Skip to content

Commit

Permalink
Merge pull request #182 from FirelyTeam/develop
Browse files Browse the repository at this point in the history
Release 1.3 DSTU2

* [#157 - Migrated Spark.Engine and Spark.Mongo to netstandard2.0](#157)
  * Also fixes: #45
* [#134 - Spark.Web - small  web project made available as an .NET Core example](#134)
* [#79 - HTML view renders too much white space](#79)
* [#80 - HTML view OperationOutcome not rendered](#80)
* [#19 - Posting to an id with a dot gives 404](#19)
* Spark.Engine and Spark.Mongo available as NuGet packages
* Docker image
  • Loading branch information
kennethmyhra authored Nov 12, 2019
2 parents 016b23b + 1943d7e commit 54282c4
Show file tree
Hide file tree
Showing 166 changed files with 31,652 additions and 1,429 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.vs/
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig
# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference?view=vs-2017

root = true

# Ensure space is used for indentation in all files
[*]
indent_style = space

# Code files indentation
[*.{cs,csx}]
indent_size = 4
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -220,3 +220,9 @@ _Pvt_Extensions
#NDepend
NDependOut/
*.ndproj

# OS X files
.DS_Store

# VS Code
.vscode/
22 changes: 22 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
language: node_js
node_js:
- "stable"
cache:
directories:
- node_modules
before_script:
- "cd docs"
- "npm install"
script:
- "npm run test"
after_success:
- "npm run deploy"
deploy:
provider: pages
skip-cleanup: true
github-token: $GITHUB_TOKEN
local_dir: docs/public
target_branch: gh-pages
keep-history: true
on:
branch: develop
2 changes: 2 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ Richard added GZip support
Brian made the resources look fresh in the UI.

* [Kenneth Myhra](https://github.com/kennethmyhra) - Kufu

* [Ole Kristian Losvik](https://github.com/losolio)
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2-stretch-slim AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443

FROM mcr.microsoft.com/dotnet/core/sdk:2.2-stretch AS build
WORKDIR /src
COPY ["./src/Spark.Web/", "Spark.Web/"]
COPY ["./src/Spark.Engine/", "Spark.Engine/"]
COPY ["./src/Spark.Mongo/", "Spark.Mongo/"]
RUN dotnet restore "/src/Spark.Web/Spark.Web.csproj"
COPY . .
RUN dotnet build "/src/Spark.Web/Spark.Web.csproj" -c Release -o /app

FROM build AS publish
RUN dotnet publish "/src/Spark.Web/Spark.Web.csproj" -c Release -o /app

FROM base AS final
WORKDIR /app
COPY --from=publish /app .
# COPY --from=build /src/Spark.Web/example_data/fhir_examples ./fhir_examples

ENTRYPOINT ["dotnet", "Spark.Web.dll"]
3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Copyright (c) 2018, Firely ([email protected]) and contributors
Copyright (c) 2014 Firely ([email protected]),
Copyright (c) 2018 Kufu ([email protected]) and contributors
See the file CONTRIBUTORS for details

All rights reserved.
Expand Down
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,26 @@ Kufu and the community, will keep enhancing this server to support the latest ve
We also welcome anyone who wants to support this effort and help us make Spark a better reference
platform and playground for FHIR.

**DISCLAIMER: The web projects Spark.Web and Spark.Classic are meant as reference implementations and should never be used out of the box in a production environment without adding as a minimum security features.**

## Quickstart
The easiest way to test Spark FHIR server is by using Docker. Make sure you have installed [Docker](https://docs.docker.com/install/). On Linux you will need to install [Docker Compose](https://docs.docker.com/compose/install/) as well. After installing Docker you could run Spark server by running the command for your operating system:

DSTU2:
* Mac OS X / Windows: `curl 'https://raw.githubusercontent.com/firelyteam/spark/develop/dockers/spark-dstu2/docker-compose.yml' > docker-compose.yml && docker-compose up`
* Linux: `curl 'https://raw.githubusercontent.com/FirelyTeam/spark/develop/dockers/spark-dstu2/docker-compose.yml' > docker-compose.yml && sudo docker-compose up`

STU3:
* Mac OS X / Windows: `curl 'https://raw.githubusercontent.com/firelyteam/spark/develop/dockers/spark-stu3/docker-compose.yml' > docker-compose.yml && docker-compose up`
* Linux: `curl 'https://raw.githubusercontent.com/FirelyTeam/spark/develop/dockers/spark-stu3/docker-compose.yml' > docker-compose.yml && sudo docker-compose up`

R4:
* Mac OS X / Windows: `curl 'https://raw.githubusercontent.com/firelyteam/spark/develop/dockers/spark-r4/docker-compose.yml' > docker-compose.yml && docker-compose up`
* Linux: `curl 'https://raw.githubusercontent.com/FirelyTeam/spark/develop/dockers/spark-r4/docker-compose.yml' > docker-compose.yml && sudo docker-compose up`

Spark FHIR server will be available after startup at `http://localhost:5555`.

## Versions

#### DSTU1
DSTU1 is no longer maintained by this project. The source code can be found in the branch **dstu1/master**.
Expand Down
29 changes: 0 additions & 29 deletions Spark.Engine.nuspec

This file was deleted.

30 changes: 0 additions & 30 deletions Spark.Mongo.nuspec

This file was deleted.

14 changes: 10 additions & 4 deletions Spark.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.329
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spark.Engine", "src\Spark.Engine\Spark.Engine.csproj", "{426991A6-546C-43D5-B055-A38D0175824F}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Spark.Engine", "src\Spark.Engine\Spark.Engine.csproj", "{426991A6-546C-43D5-B055-A38D0175824F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spark.Mongo", "src\Spark.Mongo\Spark.Mongo.csproj", "{5F0EAEA9-5226-46FF-A915-4DE9B3BA6ADD}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Spark.Mongo", "src\Spark.Mongo\Spark.Mongo.csproj", "{5F0EAEA9-5226-46FF-A915-4DE9B3BA6ADD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spark", "src\Spark\Spark.csproj", "{D12C6E96-4893-408E-9F53-A142DC82E993}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spark.Engine.Test", "src\Spark.Engine.Test\Spark.Engine.Test.csproj", "{5CA90A21-AC2E-4C30-B618-A459A1E5B04F}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Spark.Engine.Test", "src\Spark.Engine.Test\Spark.Engine.Test.csproj", "{5CA90A21-AC2E-4C30-B618-A459A1E5B04F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spark.Mongo.Tests", "src\Spark.Mongo.Tests\Spark.Mongo.Tests.csproj", "{3D3C588D-6BB5-46CD-B844-61136D30A1FB}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Spark.Mongo.Tests", "src\Spark.Mongo.Tests\Spark.Mongo.Tests.csproj", "{3D3C588D-6BB5-46CD-B844-61136D30A1FB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Spark.Web", "src\Spark.Web\Spark.Web.csproj", "{6A59CE4B-D912-4995-A805-89705B8134E0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -39,6 +41,10 @@ Global
{3D3C588D-6BB5-46CD-B844-61136D30A1FB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3D3C588D-6BB5-46CD-B844-61136D30A1FB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3D3C588D-6BB5-46CD-B844-61136D30A1FB}.Release|Any CPU.Build.0 = Release|Any CPU
{6A59CE4B-D912-4995-A805-89705B8134E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6A59CE4B-D912-4995-A805-89705B8134E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6A59CE4B-D912-4995-A805-89705B8134E0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6A59CE4B-D912-4995-A805-89705B8134E0}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
39 changes: 39 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
version: "3"
services:
spark:
container_name: spark
restart: always
build:
context: .
dockerfile: Dockerfile
environment:
- StoreSettings__ConnectionString=mongodb://root:CosmicTopSecret@mongodb:27017/spark?authSource=admin
- SparkSettings__Endpoint=http://localhost:5555/fhir
ports:
- "5555:80"
- "44348:443"
links:
- mongodb
depends_on:
- mongodb
mongodb:
container_name: mongodb
image: mongo
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: CosmicTopSecret
ports:
- "17017:27017"
mongosetup:
container_name: mongosetup
image: mongo
volumes:
- ./src/Spark.Web/example_data/db_dump:/data/db_dump
depends_on:
- mongodb
links:
- mongodb
entrypoint:
["mongorestore", "--uri=mongodb://root:CosmicTopSecret@mongodb:27017/spark", "--drop", "--archive=/data/db_dump/dstu2.archive.gz", "--gzip"]
environment:
WAIT_HOSTS: mongodb:27017
24 changes: 24 additions & 0 deletions dockers/Updating_docker_images.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Dockers and docker composers

## Update Spark images on Docker hub

In project root folder for each of the branches `develop`, `stu3/develop` and `r4/develop`:

```bash
docker build -t spark-version .
docker tag spark-fhirversion sparkfhir/spark-fhirversion
docker login
docker push sparkfhir/spark-fhirversion
```

## Updating Mongo images with preloaded examples on Docker Hub

In each `dockers/mongo-spark-fhirversion directory`:

```bash
docker build -t mongo-spark-fhirversion .
docker tag mongo-spark-fhirversion sparkfhir/mongo-spark-fhirversion:pre-release
docker login
docker push sparkfhir/mongo-spark-fhirversion:pre-release
```

3 changes: 3 additions & 0 deletions dockers/mongo-spark-dstu2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM mongo
COPY dstu2.archive.gz /home/
COPY mongorestore.sh /docker-entrypoint-initdb.d/
Binary file added dockers/mongo-spark-dstu2/dstu2.archive.gz
Binary file not shown.
2 changes: 2 additions & 0 deletions dockers/mongo-spark-dstu2/mongorestore.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
mongorestore --drop --archive=/home/dstu2.archive.gz --gzip
3 changes: 3 additions & 0 deletions dockers/mongo-spark-r4/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM mongo
COPY r4.archive.gz /home/
COPY mongorestore.sh /docker-entrypoint-initdb.d/
2 changes: 2 additions & 0 deletions dockers/mongo-spark-r4/mongorestore.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
mongorestore --drop --archive=/home/r4.archive.gz --gzip
Binary file added dockers/mongo-spark-r4/r4.archive.gz
Binary file not shown.
3 changes: 3 additions & 0 deletions dockers/mongo-spark-stu3/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM mongo
COPY stu3.archive.gz /home/
COPY mongorestore.sh /docker-entrypoint-initdb.d/
2 changes: 2 additions & 0 deletions dockers/mongo-spark-stu3/mongorestore.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
mongorestore --drop --archive=/home/stu3.archive.gz --gzip
Binary file added dockers/mongo-spark-stu3/stu3.archive.gz
Binary file not shown.
22 changes: 22 additions & 0 deletions dockers/spark-dstu2/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: "3"
services:
spark:
container_name: spark
restart: always
image: sparkfhir/spark-dstu2:pre-release
environment:
- StoreSettings__ConnectionString=mongodb://root:CosmicTopSecret@mongodb:27017/spark?authSource=admin
- SparkSettings__Endpoint=http://localhost:5555/fhir
ports:
- "5555:80"
- "44344:443"
depends_on:
- mongodb
mongodb:
container_name: mongodb
image: sparkfhir/mongo-spark-dstu2
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: CosmicTopSecret
ports:
- "17017:27017"
22 changes: 22 additions & 0 deletions dockers/spark-r4/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: "3"
services:
spark:
container_name: spark
restart: always
image: sparkfhir/spark-r4:pre-release
environment:
- StoreSettings__ConnectionString=mongodb://root:CosmicTopSecret@mongodb:27017/spark?authSource=admin
- SparkSettings__Endpoint=http://localhost:5555/fhir
ports:
- "5555:80"
- "44344:443"
depends_on:
- mongodb
mongodb:
container_name: mongodb
image: sparkfhir/mongo-spark-r4
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: CosmicTopSecret
ports:
- "17017:27017"
22 changes: 22 additions & 0 deletions dockers/spark-stu3/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: "3"
services:
spark:
container_name: spark
restart: always
image: sparkfhir/spark-stu3:pre-release
environment:
- StoreSettings__ConnectionString=mongodb://root:CosmicTopSecret@mongodb:27017/spark?authSource=admin
- SparkSettings__Endpoint=http://localhost:5555/fhir
ports:
- "5555:80"
- "44344:443"
depends_on:
- mongodb
mongodb:
container_name: mongodb
image: sparkfhir/mongo-spark-stu3
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: CosmicTopSecret
ports:
- "17017:27017"
Loading

0 comments on commit 54282c4

Please sign in to comment.