diff --git a/README.md b/README.md index 70728582ef5..5a913fcfd04 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,6 @@ a public test server is hosted at [https://test.ahdis.ch/matchbox/fhir](https:// ## containers The docker file will create a docker image with no preloaded implementation guides. A list of implementation guides to load can be passed as config-map. -A second docker file will create an image with fixed configuration and preloaded implementation guides. That docker image does not need to download the implementation guides afterwards. - ## Prerequisites - [This project](https://github.com/ahdis/matchbox) checked out. You may wish to create a GitHub Fork of the project and check that out instead so that you can customize the project and save the results to GitHub. Check out the main branch (master is kept in sync with [hapi-fhir-jpaserver-starter](https://github.com/hapifhir/hapi-fhir-jpaserver-starter) @@ -30,7 +28,7 @@ With no implementation guide: ```bash mvn clean install -DskipTests spring-boot:run ``` -Load example implementation guides: +Load example implementation guides (needs postgres): ```bash mvn clean install -DskipTests spring-boot:run -Dspring-boot.run.arguments=--spring.config.additional-location=file:with-preload/application.yaml ``` @@ -47,10 +45,21 @@ mvn clean install -DskipTests spring-boot:run -Dspring-boot.run.jvmArguments="-X Then, browse to the following link to use the server: [http://localhost:8080/matchbox/fhir](http://localhost:8080/matchbox/fhir) +or +[http://localhost:8080/matchbox/#/](http://localhost:8080/matchbox/#/) ## Using docker-compose with a persistent postgreSQL database -The database will be stored in the "data" directory. The configuration can be found in the "with-postgres" directory. +The database will be stored in the "data" directory. The configuration can be found in the "with-postgres" directory or in the "with-preload" directory. + +Change to either with-posgres directory or the with-preload directory (contains a list of swiss ig's). + +For the first time, you might need to do + +``` +docker-compose up matchbox-db +``` +that the database gets initialized before matchbox is starting up (needs a fix) ``` mkdir data @@ -60,7 +69,7 @@ docker-compose up ``` matchbox will be available at [http://localhost:8080/matchbox/fhir](http://localhost:8080/matchbox/fhir) -matchbox-formfiller will be available at [http://localhost:4300/matchbox-formfiller/#/](http://localhost:4300/matchbox-formfiller/#/) +matchbox-gui will be available at [http://localhost:8080/matchbox/#/](http://localhost:8080/matchbox/#/) Export the DB data: @@ -88,21 +97,11 @@ Server will then be accessible at http://localhost:8080/matchbox/fhir/metadata. To dynamically configure run in a kubernetes environment and add a kubernetes config map that provides /config/application.yaml file with implementation guide list like in "with-preload/application.yaml" -### Image with preloaded implementation guides - -After building the base image: -```bash -cd with-preload -docker build -t matchbox-swissepr . -docker run -d --name matchbox-swissepr -p 8080:8080 matchbox-swissepr -``` - ### making container available ``` -docker tag matchbox eu.gcr.io/fhir-ch/matchbox:v182 +docker tag matchbox eu.gcr.io/fhir-ch/matchbox:v190 -docker push eu.gcr.io/fhir-ch/matchbox:v182 -docker push eu.gcr.io/fhir-ch/matchbox-swissepr:v170 +docker push eu.gcr.io/fhir-ch/matchbox:v190 ``` API diff --git a/changelog.md b/changelog.md index 98d4697b57e..56ac6440d26 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,8 @@ -2022/03/09 Release 1.9.0 +2022/03/10 Release 1.9.0 - Updated to hap-fhir 5.7.0, fhir.core.version (validator) 5.6.27 - Extended Mobile Access Gateway support for PMP (replacing FHIR documents with selected Patient in Mobile Access Gateway, transforming to CDA and MDH publish) +- base release with no ig's configured: docker pull eu.gcr.io/fhir-ch/matchbox:v190 +- docker-compose setup for postgres and for postgres and swiss igs 2022/02/21 Release 1.8.2 - OAuth integration for [Mobile Access Gateway](https://github.com/i4mi/MobileAccessGateway) in webapp diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/BaseJpaRestfulServer.java b/src/main/java/ca/uhn/fhir/jpa/starter/BaseJpaRestfulServer.java index 493c26af37f..4b642efce24 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/BaseJpaRestfulServer.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/BaseJpaRestfulServer.java @@ -368,10 +368,10 @@ protected void initialize() throws ServletException { // If subscriptions are enabled, we want to register the interceptor that // will activate them and match results against them - if (appProperties.getSubscription() != null) { + // FIXME not specified but is still triggered: if (appProperties.getSubscription() != null) { // Subscription debug logging - interceptorService.registerInterceptor(new SubscriptionDebugLogInterceptor()); - } + // interceptorService.registerInterceptor(new SubscriptionDebugLogInterceptor()); + // } // Cascading deletes diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 128b0ee73aa..c2f2ce1a858 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -20,7 +20,7 @@ spring: properties: hibernate.format_sql: false hibernate.show_sql: false - # hibernate.dialect: org.hibernate.dialect.h2dialect + hibernate.dialect: ca.uhn.fhir.jpa.model.dialect.HapiFhirH2Dialect # hibernate.hbm2ddl.auto: update # hibernate.jdbc.batch_size: 20 # hibernate.cache.use_query_cache: false diff --git a/docker-compose.yml b/with-postgres/docker-compose.yml similarity index 100% rename from docker-compose.yml rename to with-postgres/docker-compose.yml diff --git a/with-preload/Dockerfile b/with-preload/Dockerfile deleted file mode 100644 index 8d7a413c8e9..00000000000 --- a/with-preload/Dockerfile +++ /dev/null @@ -1,4 +0,0 @@ -FROM matchbox:latest -COPY ./application.yaml /application.yaml -RUN java -Xmx1G -Xms1G -jar /app.jar --hapi.fhir.only_install_packages=true -ENTRYPOINT java -Xmx1G -Xshareclasses -Xquickstart -jar /app.jar -Dspring.config.additional-location=optional:file:/config/application.yaml,optional:file:application.yaml \ No newline at end of file diff --git a/with-preload/application.yaml b/with-preload/application.yaml index dbbb31603ca..dd021890449 100644 --- a/with-preload/application.yaml +++ b/with-preload/application.yaml @@ -1,3 +1,19 @@ +server: + servlet: + context-path: /matchbox +spring: + datasource: + url: 'jdbc:postgresql://matchbox-db:5432/matchbox' + username: matchbox + password: matchbox + driverClassName: org.postgresql.Driver + + # database connection pool size + hikari: + maximum-pool-size: 10 + jpa: + properties: + hibernate.dialect: org.hibernate.dialect.PostgreSQL95Dialect hapi: fhir: implementationguides: @@ -8,26 +24,22 @@ hapi: cdach: url: http://build.fhir.org/ig/hl7ch/cda-fhir-maps/package.tgz name: ch.fhir.ig.cda-fhir-maps - version: 0.2.0 + version: 0.3.0 iheformatcodefhir: - url: https://profiles.ihe.net/fhir/ihe.formatcode.fhir/package.tgz name: ihe.formatcode.fhir version: 1.0.0 -# terminology: -# name: hl7.terminology.r4 -# version: 2.1.0 eprterm: name: ch.fhir.ig.ch-epr-term - version: 2.0.6 + version: 2.0.7 core: name: ch.fhir.ig.ch-core version: 2.0.0 emed: name: ch.fhir.ig.ch-emed - version: 1.0.0 + version: 2.0.0 vacd: name: ch.fhir.ig.ch-vacd - version: 1.0.0 + version: 2.0.0 atc: name: ch.fhir.ig.ch-atc version: 3.1.0 @@ -36,31 +48,26 @@ hapi: version: 2.7.0 chorf: name: ch.fhir.ig.ch-orf - version: 0.10.0 + version: 1.0.0 chradorder: name: ch.fhir.ig.ch-rad-order - version: 0.1.0 + version: 1.0.0 + hl7fhiruvips: + name: hl7.fhir.uv.ips + version": 1.0.0 chetoc: name: ch.fhir.ig.ch-etoc - version: 0.1.0 + version: 1.0.0 + url: https://build.fhir.org/ig/hl7ch/ch-etoc/branches/main/package.tgz mhd: name: ihe.mhd.fhir - version: 4.0.1 + version: 4.0.1 pixm: name: IHE.ITI.PIXm version: 3.0.0 cheprmhealth: - url: https://fhir.ch/ig/ch-epr-mhealth/package.tgz name: ch.fhir.ig.ch-epr-mhealth version: 1.0.0 challergyintolerance: name: ch.fhir.ig.ch-allergyintolerance - version": 0.2.0 - chradorderpoc: - url: https://build.fhir.org/ig/ahdis/ch-rad-poc/package.tgz - name: ch.ahdis.ig.ch-rad-poc - version: 0.1.0 - chalis: - url: https://build.fhir.org/ig/ahdis/ch-alis/package.tgz - name: ch.fhir.ig.ch-alis - version": 0.2.0 \ No newline at end of file + version": 1.0.0 \ No newline at end of file diff --git a/with-preload/docker-compose.yml b/with-preload/docker-compose.yml new file mode 100644 index 00000000000..a9a262df23a --- /dev/null +++ b/with-preload/docker-compose.yml @@ -0,0 +1,27 @@ +services: + matchbox: + # build: . + image: matchbox:latest + container_name: matchbox + restart: on-failure + ports: + - "8080:8080" + links: + - matchbox-db + volumes: + - ./with-preload:/config + matchbox-db: + image: postgres:latest + container_name: matchbox-db + restart: always + # Comment out to not log queries + command: ["postgres", "-c", "log_statement=all"] + # End comment out + ports: + - "5432:5432" + environment: + POSTGRES_DB: 'matchbox' + POSTGRES_USER: 'matchbox' + POSTGRES_PASSWORD: 'matchbox' + volumes: + - ./data:/var/lib/postgresql/data