diff --git a/docker/README.md b/docker/README.md index 438fd9dd0..260bd7d57 100644 --- a/docker/README.md +++ b/docker/README.md @@ -1,42 +1,53 @@ # Docker compose files -This folder contains docker-compose files used to spin up OHIF-Viewer with differnt options such as locally or with any PAS you desire to +This folder contains docker-compose files used to spin up OHIF-Viewer with +differnt options such as locally or with any PAS you desire to ## Public Server + #### build `$ docker-compose -f docker-compose-publicserver.yml build` #### run + `$ docker-compose -f docker-compose-publicserver.yml up -d` then, access the application at [http://localhost](http://localhost) ## Local Orthanc -#### build + +### Build `$ docker-compose -f docker-compose-orthanc.yml build` -#### run +### Run + +Starts containers and leaves them running in the background. + `$ docker-compose -f docker-compose-orthanc.yml up -d` then, access the application at [http://localhost](http://localhost) -**remember that you have to access orthanc application and include your studies there** +**remember that you have to access orthanc application and include your studies +there** ## Local Dcm4chee + #### build `$ docker-compose -f docker-compose-dcm4chee.yml build` #### run + `$ docker-compose -f docker-compose-dcm4chee.yml up -d` then, access the application at [http://localhost](http://localhost) -**remember that you have to access dcm4chee application and include your studies there** -You can use the following command to import your studies into dcm4che +**remember that you have to access dcm4chee application and include your studies +there** You can use the following command to import your studies into dcm4che `$ docker run -v {YOUR_STUDY_FOLDER}:/tmp --rm --network=docker_dcm4che_default dcm4che/dcm4che-tools:5.14.0 storescu -cDCM4CHEE@arc:11112 /tmp` -**make sure that your Docker network name is docker_dcm4chee_default or change it to the right one** \ No newline at end of file +**make sure that your Docker network name is docker_dcm4chee_default or change +it to the right one** diff --git a/docker/docker-compose-orthanc.yml b/docker/docker-compose-orthanc.yml index 1706b4c2b..5b4edea0e 100644 --- a/docker/docker-compose-orthanc.yml +++ b/docker/docker-compose-orthanc.yml @@ -1,3 +1,6 @@ +# docker-compose: +# https://docs.docker.com/compose/overview/ + version: '3.5' services: @@ -13,15 +16,17 @@ services: viewer: container_name: ohif-viewer build: + # Up to the root directory context: ../ - dockerfile: Dockerfile + # Use our dockerfile to build the viewer + dockerfile: dockerfile ports: - '80:80' depends_on: - orthanc environment: - NODE_ENV=production - - REACT_APP_CONFIG=config/local_orthanc + - REACT_APP_CONFIG=config/local_orthanc.js restart: always volumes: - ../config/local_orthanc.js:/usr/share/nginx/html/servers.js diff --git a/dockerfile b/dockerfile index f20d2ac68..23c027cfe 100644 --- a/dockerfile +++ b/dockerfile @@ -4,7 +4,6 @@ FROM node:11.2.0-slim as builder # RUN apt-get update && apt-get install -y git yarn RUN mkdir /usr/src/app - WORKDIR /usr/src/app ENV PATH /usr/src/app/node_modules/.bin:$PATH @@ -21,6 +20,6 @@ RUN yarn run build:web FROM nginx:1.15.5-alpine RUN rm -rf /etc/nginx/conf.d COPY conf /etc/nginx -COPY --from=builder /usr/src/app/public /usr/share/nginx/html +COPY --from=builder /usr/src/app/build /usr/share/nginx/html EXPOSE 80 CMD ["nginx", "-g", "daemon off;"]