From 2d4889360279dcbc9c4e1683cd9e98baeb791cbe Mon Sep 17 00:00:00 2001 From: dannyrb Date: Fri, 10 May 2019 09:18:28 -0400 Subject: [PATCH 01/26] Remove publicserver example (we get this for free with CRA) --- docker/Nginx/docker-compose-publicserver.yml | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 docker/Nginx/docker-compose-publicserver.yml diff --git a/docker/Nginx/docker-compose-publicserver.yml b/docker/Nginx/docker-compose-publicserver.yml deleted file mode 100644 index be969291a..000000000 --- a/docker/Nginx/docker-compose-publicserver.yml +++ /dev/null @@ -1,13 +0,0 @@ -version: '3.5' - -services: - viewer: - container_name: ohif-viewer - build: - context: ../ - dockerfile: Dockerfile - ports: - - '80:80' - environment: - - NODE_ENV=production - - REACT_APP_CONFIG=config/public_dicomweb From ed91e2678f0573132fee575548a1e0454a34e553 Mon Sep 17 00:00:00 2001 From: dannyrb Date: Fri, 10 May 2019 09:18:46 -0400 Subject: [PATCH 02/26] This is outdated - refer to /docs --- docker/OpenResty-Orthanc-Keycloak/README.md | 31 --------------------- 1 file changed, 31 deletions(-) delete mode 100644 docker/OpenResty-Orthanc-Keycloak/README.md diff --git a/docker/OpenResty-Orthanc-Keycloak/README.md b/docker/OpenResty-Orthanc-Keycloak/README.md deleted file mode 100644 index 3582f8dbf..000000000 --- a/docker/OpenResty-Orthanc-Keycloak/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# Guide - -Build docker container using: - -- Build: `docker build -t authproxy .` -- Tag: `docker tag authproxy:latest authproxy:staging` - -> Start your docker container, and volume mount the directory containing the -> `nginx-keycloak.conf` configuration file. We also mount the current directory -> under `/usr/share/nginx/html` so any html files in the current directory will -> be hosted behind the authenticating proxy. Finally, we mapped port 80 on the -> host to port 80 in the container. - -`docker run -d -it -p 80:80 -v $PWD/:/config -v /:/usr/share/nginx/html authproxy -c /config/nginx.conf` -docker run -d -it -p 80:80 -v /:/config -v /:/usr/share/nginx/html authproxy -c -/config/nginx-keycloak.conf - -## Orthanc - -- Configuration - - http://book.orthanc-server.com/users/configuration.html#configuration - -## Keycloak - -### Setup - -Library we use to manage OpenID-Connect `implicit` flow: -https://github.com/maxmantz/redux-oidc - -- Set admin user/pass in `docker-compose` -- What are realms? From 5c8b4c7e0e774a0b76f962eaf32943eb214d3a20 Mon Sep 17 00:00:00 2001 From: dannyrb Date: Fri, 10 May 2019 09:25:51 -0400 Subject: [PATCH 03/26] Requirements for local data source --- docs/latest/essentials/data-source.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/latest/essentials/data-source.md b/docs/latest/essentials/data-source.md index 116495dba..a0840985f 100644 --- a/docs/latest/essentials/data-source.md +++ b/docs/latest/essentials/data-source.md @@ -27,7 +27,12 @@ For our purposes, we will be using `Orthanc`, but you can see a list of ### Requirements -... +- Docker + - [Docker for Mac](https://docs.docker.com/docker-for-mac/) + - [Docker for Windows](https://docs.docker.com/docker-for-windows/) + +_Not sure if you have `docker` installed already? Try running `docker --version` +in command prompt or terminal_ ### Running Orthanc From 522f29d3593ff0bb0ec7c8ec624b8a4253ff91f0 Mon Sep 17 00:00:00 2001 From: dannyrb Date: Fri, 10 May 2019 09:26:03 -0400 Subject: [PATCH 04/26] Note about other image archives --- docs/latest/essentials/data-source.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/latest/essentials/data-source.md b/docs/latest/essentials/data-source.md index a0840985f..3a7f79d66 100644 --- a/docs/latest/essentials/data-source.md +++ b/docs/latest/essentials/data-source.md @@ -96,6 +96,9 @@ The `REACT_APP_CONFIG` value tells our app which file to load on to ## Open Source DICOM Image Archives +Our example uses `Orthanc`, but there are a lot of options available to you. +Here are some of the more popular ones: + | Archive | Installation | | --------------------------------------------- | ---------------------------------- | | [DCM4CHEE Archive 5.x][dcm4chee] | [W/ Docker][dcm4chee-docker] | From 74cac08ce7f71b135870751ddb89a0c2e2ee2111 Mon Sep 17 00:00:00 2001 From: dannyrb Date: Fri, 10 May 2019 09:29:18 -0400 Subject: [PATCH 05/26] Add a snapshot of our config --- docs/latest/essentials/data-source.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/docs/latest/essentials/data-source.md b/docs/latest/essentials/data-source.md index 3a7f79d66..7d828e8a0 100644 --- a/docs/latest/essentials/data-source.md +++ b/docs/latest/essentials/data-source.md @@ -92,7 +92,31 @@ cross-env PORT=5000 REACT_APP_CONFIG=config/docker_nginx-orthanc.js react-script The `REACT_APP_CONFIG` value tells our app which file to load on to `window.config`. By default, our app uses the file at -`/public/config/default.js`. +`/public/config/default.js`. Here is what that configuration looks +like: + +```js +window.config = { + routerBasename: '/', + relativeWebWorkerScriptsPath: '', + servers: { + dicomWeb: [ + { + name: 'Orthanc', + wadoUriRoot: 'http://localhost:8899/wado', + qidoRoot: 'http://localhost:8899/dicom-web', + wadoRoot: 'http://localhost:8899/dicom-web', + qidoSupportsIncludeField: false, + imageRendering: 'wadors', + thumbnailRendering: 'wadors', + }, + ], + }, +} +``` + +To learn more about how you can configure the OHIF Viewer, check out our +[Configuration Guide](./configuration.md). ## Open Source DICOM Image Archives From f8d8e1ad5130a680dd1041b9dc75b28c4f0fc8ff Mon Sep 17 00:00:00 2001 From: dannyrb Date: Fri, 10 May 2019 09:33:39 -0400 Subject: [PATCH 06/26] Remove empty deployment page --- docs/latest/SUMMARY.md | 1 - docs/latest/essentials/deployment.md | 1 - 2 files changed, 2 deletions(-) delete mode 100644 docs/latest/essentials/deployment.md diff --git a/docs/latest/SUMMARY.md b/docs/latest/SUMMARY.md index 1e8e13635..a7ae5632a 100644 --- a/docs/latest/SUMMARY.md +++ b/docs/latest/SUMMARY.md @@ -7,7 +7,6 @@ - [Themeing](essentials/themeing.md) - [Troubleshooting](essentials/troubleshooting.md) - [Architecture](essentials/architecture.md) -- [Deployment](essentials/deployment.md) --- diff --git a/docs/latest/essentials/deployment.md b/docs/latest/essentials/deployment.md deleted file mode 100644 index d36c65e59..000000000 --- a/docs/latest/essentials/deployment.md +++ /dev/null @@ -1 +0,0 @@ -# Deployment From 5609070fd811b5a4a93678202b20606bf863d00a Mon Sep 17 00:00:00 2001 From: dannyrb Date: Fri, 10 May 2019 09:46:58 -0400 Subject: [PATCH 07/26] Add installation --- docs/latest/SUMMARY.md | 1 + docs/latest/essentials/installation.md | 42 ++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 docs/latest/essentials/installation.md diff --git a/docs/latest/SUMMARY.md b/docs/latest/SUMMARY.md index a7ae5632a..c06ce54ab 100644 --- a/docs/latest/SUMMARY.md +++ b/docs/latest/SUMMARY.md @@ -2,6 +2,7 @@ - Essentials - [Getting Started](essentials/getting-started.md) + - [Installation](essentials/installation.md) - [Data Source](essentials/data-source.md) - [Configuration](essentials/configuration.md) - [Themeing](essentials/themeing.md) diff --git a/docs/latest/essentials/installation.md b/docs/latest/essentials/installation.md new file mode 100644 index 000000000..326b5f0d2 --- /dev/null +++ b/docs/latest/essentials/installation.md @@ -0,0 +1,42 @@ +# Installation + +It's important to know that the OHIF Viewer project provides two different build +processes: + +```bash +# Static Asset output: For deploying PWAs +yarn run build:web + +# Single `.js` script, for embedding viewer into existing apps +yarn run build:package +``` + +## create-react-app (PWA) + +> [create-react-app](https://github.com/facebook/create-react-app) provides +> pre-configured build process for developing front-end applications with +> [React](https://reactjs.org/). + +The ohif-viewer package can be run as a create-react-app application. This is +useful for development, debugging, or evolving the OHIF Viewer into your own +custom imaging application. + +You can read more about this particular strategy in our +[Build for Production Deployment Guide](./../deployment/recipes/build-for-production.md) + +## Rollup (Packaged Script) + +> [Rollup](https://rollupjs.org/guide/en) is a module bundler for JavaScript. It +> uses the new standardized format for code modules included in the ES6 revision +> of JavaScript. + +The [ohif-viewer](https://www.npmjs.com/package/ohif-viewer) package can be +built with Rollup to provide a set of React components which can be dropped into +a larger application. Specifically, the ohif-viewer package provides a React +component named `OHIFViewer` which is the entire viewer, configurable via React +`props`. This is useful for including the OHIF Viewer in a larger web +application, as the entire application can be provided via a `