Permalink
Browse files

Add dockerfile and docker-compose setup.

  • Loading branch information...
swederik committed Mar 28, 2018
1 parent bf68707 commit d3d05c42bce5cd0eaf940ea09ca6d324465ec770
Showing with 131 additions and 0 deletions.
  1. +17 −0 .dockerignore
  2. +19 −0 docker-compose.yml
  3. +50 −0 dockerfile
  4. +9 −0 dockersupport/app.json
  5. +36 −0 dockersupport/ohifviewer.env
View
@@ -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/
View
@@ -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"
View
@@ -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"]
View
@@ -0,0 +1,9 @@
{
"apps" : [{
"name" : "ohif-viewer",
"script" : "main.js",
"watch" : true,
"merge_logs" : true,
"cwd" : "/app/bundle/"
}]
}
@@ -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
}
}"

0 comments on commit d3d05c4

Please sign in to comment.