Add dockerfile and docker-compose setup.
This commit is contained in:
parent
bf68707ff2
commit
d3d05c42bc
17
.dockerignore
Normal file
17
.dockerignore
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
.idea/
|
||||||
|
.meteor/local
|
||||||
|
.meteor/meteorite
|
||||||
|
.meteor/dev_bundle
|
||||||
|
*/.meteor/dev_bundle
|
||||||
|
node_modules
|
||||||
|
.npm
|
||||||
|
npm-debug.log
|
||||||
|
Packages/active-entry/helloworld/
|
||||||
|
LesionTracker/tests/nightwatch/reports/
|
||||||
|
package-lock.json
|
||||||
|
docs/_book
|
||||||
|
docs/
|
||||||
|
img/
|
||||||
|
test/
|
||||||
|
LesionTracker/
|
||||||
|
StandaloneViewer/
|
||||||
19
docker-compose.yml
Normal file
19
docker-compose.yml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
version: '3.6'
|
||||||
|
services:
|
||||||
|
mongo:
|
||||||
|
image: "mongo:latest"
|
||||||
|
ports:
|
||||||
|
- "27017:27017"
|
||||||
|
|
||||||
|
viewer:
|
||||||
|
#image: ohifviewer:latest
|
||||||
|
build: .
|
||||||
|
ports:
|
||||||
|
- "3000:3000"
|
||||||
|
links:
|
||||||
|
- mongo
|
||||||
|
env_file: dockersupport/ohifviewer.env # TODO: Doesn't look like METEOR Settings are being used properly?
|
||||||
|
environment:
|
||||||
|
- MONGO_URL=mongodb://mongo:27017/ohif
|
||||||
|
extra_hosts:
|
||||||
|
- "localpacs:192.168.1.11"
|
||||||
50
dockerfile
Normal file
50
dockerfile
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
# First stage of multi-stage build
|
||||||
|
# Installs Meteor and builds node.js version
|
||||||
|
# This stage is named 'builder'
|
||||||
|
# The data for this intermediary image is not included
|
||||||
|
# in the final image.
|
||||||
|
FROM node:8.10.0-slim as builder
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
curl \
|
||||||
|
g++ \
|
||||||
|
build-essential
|
||||||
|
|
||||||
|
RUN curl https://install.meteor.com/ | sh
|
||||||
|
|
||||||
|
# Create a non-root user
|
||||||
|
RUN useradd -ms /bin/bash user
|
||||||
|
USER user
|
||||||
|
ADD --chown=user:user . /home/user/Viewers
|
||||||
|
|
||||||
|
WORKDIR /home/user/Viewers/OHIFViewer
|
||||||
|
|
||||||
|
RUN meteor npm install
|
||||||
|
ENV METEOR_PACKAGE_DIRS=../Packages
|
||||||
|
RUN meteor build --directory /home/user/app
|
||||||
|
WORKDIR /home/user/app/bundle/programs/server
|
||||||
|
RUN npm install --production
|
||||||
|
|
||||||
|
# Second stage of multi-stage build
|
||||||
|
# Creates a slim production image for the node.js application
|
||||||
|
#
|
||||||
|
# TODO: Switch to node:8.10.0-alpine for size purposes. I was getting Segmentation Faults from the node
|
||||||
|
# process. There are probably some minor changes to be made to ensure it works.
|
||||||
|
FROM node:8.10.0-slim
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=builder /home/user/app .
|
||||||
|
|
||||||
|
RUN npm install -g pm2
|
||||||
|
|
||||||
|
ADD dockersupport/app.json .
|
||||||
|
|
||||||
|
ENV ROOT_URL http://localhost:3000
|
||||||
|
ENV PORT 3000
|
||||||
|
ENV NODE_ENV development
|
||||||
|
|
||||||
|
EXPOSE 3000
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
CMD ["pm2-runtime", "app.json"]
|
||||||
|
|
||||||
9
dockersupport/app.json
Normal file
9
dockersupport/app.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"apps" : [{
|
||||||
|
"name" : "ohif-viewer",
|
||||||
|
"script" : "main.js",
|
||||||
|
"watch" : true,
|
||||||
|
"merge_logs" : true,
|
||||||
|
"cwd" : "/app/bundle/"
|
||||||
|
}]
|
||||||
|
}
|
||||||
36
dockersupport/ohifviewer.env
Normal file
36
dockersupport/ohifviewer.env
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
METEOR_SETTINGS = "{
|
||||||
|
"servers": {
|
||||||
|
"dicomWeb": [
|
||||||
|
{
|
||||||
|
"name": "Orthanc",
|
||||||
|
"wadoUriRoot": "http://localpacs:8042/wado",
|
||||||
|
"qidoRoot": "http://localpacs:8042/dicom-web",
|
||||||
|
"wadoRoot": "http://localpacs:8042/dicom-web",
|
||||||
|
"qidoSupportsIncludeField": false,
|
||||||
|
"imageRendering": "wadouri",
|
||||||
|
"thumbnailRendering": "wadors",
|
||||||
|
"requestOptions": {
|
||||||
|
"auth": "orthanc:orthanc",
|
||||||
|
"logRequests": true,
|
||||||
|
"logResponses": false,
|
||||||
|
"logTiming": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"defaultServiceType": "dicomWeb",
|
||||||
|
"dropCollections": true,
|
||||||
|
"public": {
|
||||||
|
"verifyEmail": false,
|
||||||
|
"ui": {
|
||||||
|
"studyListFunctionsEnabled": true,
|
||||||
|
"leftSidebarOpen": false,
|
||||||
|
"displaySetNavigationLoopOverSeries": false,
|
||||||
|
"displaySetNavigationMultipleViewports": true,
|
||||||
|
"autoPositionMeasurementsTextCallOuts": "TRLB"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"proxy": {
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
}"
|
||||||
Loading…
Reference in New Issue
Block a user