Closed rvadhith closed 1 year ago
Hi @rvadhith since you're using multiple containers, you may want to use Docker Compose https://docs.docker.com/compose/. Here is a working docker-compose.yml file for Orthanc and OHIF. Set the individual config files for nginx.conf, orthanc.json and viewer.js to your needs.
version: '3.6' services:
orthanc: image: osimis/orthanc container_name: orthanc depends_on:
POSTGRESQL_PLUGIN_ENABLED=true command: /etc/orthanc
nginx: image: nginx container_name: nginx restart: always networks:
dhparam:/etc/ssl/certs
viewer: image: ohif/viewer:v1.x container_name: viewer depends_on:
MONGO_URL=${MONGO_URL:-mongodb://mongo:27017/ohif}
certbot: image: certbot/certbot container_name: certbot volumes:
viewer command: certonly --webroot --webroot-path=/var/www/html --email [email address] --text --agree-tos --no-eff-email --force-renewal -d [URL]
postgres: image: postgres:12.1 container_name: postgres restart: always networks:
POSTGRES_DB=orthanc
mongo: image: mongo:4.0.14 container_name: mongo restart: always networks:
networks: frontend: backend:
volumes: certbot-etc: certbot-var: web-root: driver: local driver_opts: type: none device: [host filesystem location] o: bind dhparam: driver: local driver_opts: type: none device: [host filesystem location] o: bind
Please review the latest code in the master branch. I am confident that this issue has been resolved. If it persists, kindly reopen the issue with updated details.
Try viewer-dev.ohif.org instead of viewer.ohif.org
Our viewer.ohif.org
is deployed from release
branch while viewer-dev.ohif.org
is our master
branch
Read more about branch explanations here https://docs.ohif.org/development/getting-started#developing
I am trying to connect ohif viewer and orthanc by running them as separate containers. But when I access ohif viewer in port http://localhost:8002/, I am getting 502 bad gateway error
I am running ohif viewer by using the docker image from https://hub.docker.com/r/ohif/viewer. I am running orthanc using docker with the following command (docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc-plugins)
If I go to http://localhost:8042/app/explorer.html, I would be able to access orthanc
I am starting the ohif viewer with the following command:
docker run -d -v /home/adhithya/AIkenist/app-config.js:/usr/share/nginx/html/app-config.js -v /home/adhithya/AIkenist/nginx.conf:/etc/nginx/nginx.conf -p 8002:80 ohif/viewer:latest
I have replaced the app-config.js file in /usr/share/nginx/html/ using the following app-config.js file
I have replaced the nginx.conf file in /etc/nginx/nginx.conf using the following nginx.conf file
When I go to port http://localhost:8002/ to access ohif viewer I am getting the following error
I got the following log messages in the ohif viewer docker container
I am doing something wrong with the nginx.conf file. I am not setting the server in the right format in upstream orthanc-server. @dannyrb Could you please let me know what are the changes I need to make. Could you also let me know if I have to alter the the orthanc configuration and if so how should I make the required alterations