fix(nginx archive recipe): Fixes to various configuration files. (#3624)
Co-authored-by: Alireza <ar.sedghi@gmail.com>
This commit is contained in:
parent
6d47dce4dd
commit
3ce72254b3
@ -1,6 +1,12 @@
|
|||||||
# Reduces size of context and hides
|
# Reduces size of context and hides
|
||||||
# files from Docker (can't COPY or ADD these)
|
# files from Docker (can't COPY or ADD these)
|
||||||
|
|
||||||
|
# Note that typically the Docker context for various OHIF containers is the
|
||||||
|
# directory of this file (i.e. the root of the source). As such, this is
|
||||||
|
# the .dockerignore file for ALL Docker containers that are built. For example,
|
||||||
|
# the Docker containers built from the recipes in ./platform/app/.recipes will
|
||||||
|
# have this file as their .dockerignore.
|
||||||
|
|
||||||
# Output
|
# Output
|
||||||
dist/
|
dist/
|
||||||
build/
|
build/
|
||||||
@ -28,3 +34,4 @@ dockerfile
|
|||||||
.vscode/
|
.vscode/
|
||||||
coverage/
|
coverage/
|
||||||
docs/
|
docs/
|
||||||
|
testdata/
|
||||||
|
|||||||
@ -1,16 +0,0 @@
|
|||||||
# Output
|
|
||||||
dist/
|
|
||||||
|
|
||||||
# Dependencies
|
|
||||||
node_modules/
|
|
||||||
|
|
||||||
# Root
|
|
||||||
README.md
|
|
||||||
Dockerfile
|
|
||||||
|
|
||||||
# Misc. Config
|
|
||||||
.git
|
|
||||||
.DS_Store
|
|
||||||
.gitignore
|
|
||||||
.vscode
|
|
||||||
.circleci
|
|
||||||
@ -10,9 +10,9 @@ services:
|
|||||||
ohif_viewer:
|
ohif_viewer:
|
||||||
build:
|
build:
|
||||||
# Project root
|
# Project root
|
||||||
context: ./../../
|
context: ./../../../../
|
||||||
# Relative to context
|
# Relative to context
|
||||||
dockerfile: ./docker/OpenResty-Orthanc-Keycloak/dockerfile
|
dockerfile: ./platform/app/.recipes/OpenResty-Orthanc-Keycloak/dockerfile
|
||||||
image: webapp:latest
|
image: webapp:latest
|
||||||
container_name: webapp
|
container_name: webapp
|
||||||
volumes:
|
volumes:
|
||||||
@ -35,7 +35,7 @@ services:
|
|||||||
# TODO: Update to use Postgres
|
# TODO: Update to use Postgres
|
||||||
# https://github.com/mrts/docker-postgresql-multiple-databases
|
# https://github.com/mrts/docker-postgresql-multiple-databases
|
||||||
orthanc:
|
orthanc:
|
||||||
image: jodogne/orthanc-plugins:1.5.6
|
image: jodogne/orthanc-plugins
|
||||||
hostname: orthanc
|
hostname: orthanc
|
||||||
container_name: orthanc
|
container_name: orthanc
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
|
|
||||||
# Stage 1: Build the application
|
# Stage 1: Build the application
|
||||||
FROM node:11.2.0-slim as builder
|
FROM node:16.15.0-slim as builder
|
||||||
|
|
||||||
RUN mkdir /usr/src/app
|
RUN mkdir /usr/src/app
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
@ -31,12 +31,15 @@ WORKDIR /usr/src/app
|
|||||||
ENV APP_CONFIG=config/docker_openresty-orthanc-keycloak.js
|
ENV APP_CONFIG=config/docker_openresty-orthanc-keycloak.js
|
||||||
ENV PATH /usr/src/app/node_modules/.bin:$PATH
|
ENV PATH /usr/src/app/node_modules/.bin:$PATH
|
||||||
|
|
||||||
COPY package.json /usr/src/app/package.json
|
# Copy all files from the root of the OHIF source and note
|
||||||
COPY yarn.lock /usr/src/app/yarn.lock
|
# that the Docker ignore file at the root (i.e. ./dockerignore) will filter
|
||||||
|
# out files and directories that are not needed.
|
||||||
|
COPY ./ /usr/src/app/
|
||||||
|
|
||||||
ADD . /usr/src/app/
|
ADD . /usr/src/app/
|
||||||
|
RUN yarn config set workspaces-experimental true
|
||||||
RUN yarn install
|
RUN yarn install
|
||||||
RUN yarn run build:web
|
RUN yarn run build
|
||||||
|
|
||||||
# Stage 2: Bundle the built application into a Docker container
|
# Stage 2: Bundle the built application into a Docker container
|
||||||
# which runs openresty (nginx) using Alpine Linux
|
# which runs openresty (nginx) using Alpine Linux
|
||||||
@ -60,6 +63,6 @@ RUN luarocks install lua-resty-openidc
|
|||||||
RUN luarocks install luacrypto
|
RUN luarocks install luacrypto
|
||||||
|
|
||||||
# Copy build output to image
|
# Copy build output to image
|
||||||
COPY --from=builder /usr/src/app/build /var/www/html
|
COPY --from=builder /usr/src/app/platform/app/dist /var/www/html
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/local/openresty/nginx/sbin/nginx", "-g", "daemon off;"]
|
ENTRYPOINT ["/usr/local/openresty/nginx/sbin/nginx", "-g", "daemon off;"]
|
||||||
|
|||||||
@ -1,16 +0,0 @@
|
|||||||
# Output
|
|
||||||
dist/
|
|
||||||
|
|
||||||
# Dependencies
|
|
||||||
node_modules/
|
|
||||||
|
|
||||||
# Root
|
|
||||||
README.md
|
|
||||||
Dockerfile
|
|
||||||
|
|
||||||
# Misc. Config
|
|
||||||
.git
|
|
||||||
.DS_Store
|
|
||||||
.gitignore
|
|
||||||
.vscode
|
|
||||||
.circleci
|
|
||||||
@ -118,6 +118,8 @@ http {
|
|||||||
index index.html;
|
index index.html;
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
add_header Cache-Control "no-store, no-cache, must-revalidate";
|
add_header Cache-Control "no-store, no-cache, must-revalidate";
|
||||||
|
add_header 'Cross-Origin-Opener-Policy' 'same-origin' always;
|
||||||
|
add_header 'Cross-Origin-Embedder-Policy' 'require-corp' always;
|
||||||
}
|
}
|
||||||
|
|
||||||
# EXAMPLE: Redirect server error pages to the static page /40x.html
|
# EXAMPLE: Redirect server error pages to the static page /40x.html
|
||||||
|
|||||||
@ -34,7 +34,7 @@ services:
|
|||||||
# TODO: Update to use Postgres
|
# TODO: Update to use Postgres
|
||||||
# https://github.com/mrts/docker-postgresql-multiple-databases
|
# https://github.com/mrts/docker-postgresql-multiple-databases
|
||||||
orthanc:
|
orthanc:
|
||||||
image: jodogne/orthanc-plugins:1.5.6
|
image: jodogne/orthanc-plugins
|
||||||
hostname: orthanc
|
hostname: orthanc
|
||||||
container_name: orthanc
|
container_name: orthanc
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@ -23,24 +23,19 @@
|
|||||||
|
|
||||||
|
|
||||||
# Stage 1: Build the application
|
# Stage 1: Build the application
|
||||||
FROM node:12.22.1-slim as builder
|
FROM node:16.15.0-slim as builder
|
||||||
|
|
||||||
RUN mkdir /usr/src/app
|
RUN mkdir /usr/src/app
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
# Copy Files
|
# Copy all files from the root of the OHIF source and note
|
||||||
COPY .docker /usr/src/app/.docker
|
# that the Docker ignore file at the root (i.e. ./dockerignore) will filter
|
||||||
COPY .webpack /usr/src/app/.webpack
|
# out files and directories that are not needed.
|
||||||
COPY extensions /usr/src/app/extensions
|
COPY ./ /usr/src/app/
|
||||||
COPY modes /usr/src/app/modes
|
|
||||||
COPY platform /usr/src/app/platform
|
# For arm builds since parcel doesn't have prebuilt binaries for arm yet
|
||||||
COPY .browserslistrc /usr/src/app/.browserslistrc
|
RUN apt-get update && apt-get install -y build-essential python3
|
||||||
COPY aliases.config.js /usr/src/app/aliases.config.js
|
|
||||||
COPY babel.config.js /usr/src/app/babel.config.js
|
|
||||||
COPY lerna.json /usr/src/app/lerna.json
|
|
||||||
COPY package.json /usr/src/app/package.json
|
|
||||||
COPY postcss.config.js /usr/src/app/postcss.config.js
|
|
||||||
COPY yarn.lock /usr/src/app/yarn.lock
|
|
||||||
|
|
||||||
# ADD . /usr/src/app/
|
# ADD . /usr/src/app/
|
||||||
RUN yarn config set workspaces-experimental true
|
RUN yarn config set workspaces-experimental true
|
||||||
|
|||||||
@ -1,32 +1,39 @@
|
|||||||
window.config = {
|
window.config = {
|
||||||
routerBasename: '/',
|
routerBasename: '/',
|
||||||
showStudyList: true,
|
showStudyList: true,
|
||||||
|
extensions: [],
|
||||||
|
modes: [],
|
||||||
// below flag is for performance reasons, but it might not work for all servers
|
// below flag is for performance reasons, but it might not work for all servers
|
||||||
|
|
||||||
showWarningMessageForCrossOrigin: true,
|
showWarningMessageForCrossOrigin: true,
|
||||||
showCPUFallbackMessage: true,
|
showCPUFallbackMessage: true,
|
||||||
showLoadingIndicator: true,
|
showLoadingIndicator: true,
|
||||||
strictZSpacingForVolumeViewport: true,
|
strictZSpacingForVolumeViewport: true,
|
||||||
servers: {
|
defaultDataSourceName: 'dicomweb',
|
||||||
// This is an array, but we'll only use the first entry for now
|
dataSources: [
|
||||||
dicomWeb: [
|
{
|
||||||
{
|
namespace: '@ohif/extension-default.dataSourcesModule.dicomweb',
|
||||||
|
sourceName: 'dicomweb',
|
||||||
|
configuration: {
|
||||||
|
friendlyName: 'Orthanc Server',
|
||||||
name: 'Orthanc',
|
name: 'Orthanc',
|
||||||
wadoUriRoot: 'http://127.0.0.1/pacs/wado',
|
wadoUriRoot: 'http://127.0.0.1/pacs/dicom-web',
|
||||||
qidoRoot: 'http://127.0.0.1/pacs/dicom-web',
|
qidoRoot: 'http://127.0.0.1/pacs/dicom-web',
|
||||||
wadoRoot: 'http://127.0.0.1/pacs/dicom-web',
|
wadoRoot: 'http://127.0.0.1/pacs/dicom-web',
|
||||||
qidoSupportsIncludeField: false,
|
qidoSupportsIncludeField: true,
|
||||||
|
supportsReject: true,
|
||||||
imageRendering: 'wadors',
|
imageRendering: 'wadors',
|
||||||
thumbnailRendering: 'wadors',
|
thumbnailRendering: 'wadors',
|
||||||
omitQuotationForMultipartRequest: true,
|
enableStudyLazyLoad: true,
|
||||||
// REQUIRED TAG:
|
supportsFuzzyMatching: true,
|
||||||
// TODO: Remove tag after https://github.com/OHIF/ohif-core/pull/19 is merged and we bump version
|
supportsWildcard: true,
|
||||||
// requestOptions: {
|
dicomUploadEnabled: true,
|
||||||
// undefined to use JWT + Bearer auth
|
bulkDataURI: {
|
||||||
// auth: 'orthanc:orthanc',
|
enabled: true,
|
||||||
// },
|
},
|
||||||
},
|
},
|
||||||
],
|
},
|
||||||
},
|
],
|
||||||
// This is an array, but we'll only use the first entry for now
|
// This is an array, but we'll only use the first entry for now
|
||||||
oidc: [
|
oidc: [
|
||||||
{
|
{
|
||||||
|
|||||||
@ -17,13 +17,20 @@ window.config = {
|
|||||||
configuration: {
|
configuration: {
|
||||||
friendlyName: 'Orthanc Server',
|
friendlyName: 'Orthanc Server',
|
||||||
name: 'Orthanc',
|
name: 'Orthanc',
|
||||||
wadoUriRoot: 'http://127.0.0.1/pacs/wado',
|
wadoUriRoot: 'http://127.0.0.1/pacs/dicom-web',
|
||||||
qidoRoot: 'http://127.0.0.1/pacs/dicom-web',
|
qidoRoot: 'http://127.0.0.1/pacs/dicom-web',
|
||||||
wadoRoot: 'http://127.0.0.1/pacs/dicom-web',
|
wadoRoot: 'http://127.0.0.1/pacs/dicom-web',
|
||||||
qidoSupportsIncludeField: false,
|
qidoSupportsIncludeField: true,
|
||||||
|
supportsReject: true,
|
||||||
imageRendering: 'wadors',
|
imageRendering: 'wadors',
|
||||||
thumbnailRendering: 'wadors',
|
thumbnailRendering: 'wadors',
|
||||||
omitQuotationForMultipartRequest: true,
|
enableStudyLazyLoad: true,
|
||||||
|
supportsFuzzyMatching: true,
|
||||||
|
supportsWildcard: true,
|
||||||
|
dicomUploadEnabled: true,
|
||||||
|
bulkDataURI: {
|
||||||
|
enabled: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -83,7 +83,7 @@ in command prompt or terminal_
|
|||||||
|
|
||||||
### Setup
|
### Setup
|
||||||
|
|
||||||
- Navigate to `viewer` folder inside `platform`
|
- Navigate to `app` folder inside `platform`
|
||||||
- then: `cd .recipes/OpenResty-Orthanc`
|
- then: `cd .recipes/OpenResty-Orthanc`
|
||||||
- run: `docker-compose up --build`
|
- run: `docker-compose up --build`
|
||||||
- Navigate to `127.0.0.1` for the viewer
|
- Navigate to `127.0.0.1` for the viewer
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user