Questions on setting up Osimis Orthanc & Viewer in docker

My laptop environment is Win10 (HostOS, HyperV disabled) =>Vagrant/VirtualBox =>Ubuntu (Guest OS) => Docker
My vagrantfile setup includes:
1/ a private network: 192.168.33.10
2/ forwarding port 80 (from guest) to port 591 (on host)

I am looking at a Github Orthanc(Osimis) + OHIF setup example: https://github.com/trypag/ohif-orthanc-postgres-docker
I have networking questions (due to the presence of Vagrant and I can’t use Docker-For-Windows for personal reasons)

nginx.conf

Q1/ ln6: in server_name, I replaced the 127.0.0.1 with 192.168.33.10.
But should there be a port # assigned to this server_name?
I have to get the container to talk to the Windows Host UI, that is why I forwarded the port80 to port591
For my environment, should line6 really be defined: server_name 192.168.33.10:591 (and keep the default port 80 defined in this file unchanged)
And then replace all calls for localhost in viewer.js with 192.168.33.10

Q2/ There are lines (ln30, ln45) in this config file that call: http://orthanc:8042/
But where is orthanc defined? There is one mention/definition of “orthanc” and that is the name of the container services at ln 21 in docker-compose.yml

orthanc.json
(Note: I have gone through the OrthancBook on Network section & looked at the examples for Horos, etc. My question arises from the complication of using Vagrant as an intermediate)

The default Orthanc AET, DicomPort, defined in this file are “ORTHANC” and “4242”.

Q3/ How about the Orthanc’s IP?
Is it 127.0.0.1 or the IP address assigned to the orthanc service by the docker bridge network (but this address is internal and only seen by other container services and cannot be seen by the host) or it is 192.168.33.10 - the private network address I assigned to in my vagrantfile?
Note: As the compose yml file in the above reference places orthanc service in “frontend” & “backend” network. So, when I use docker network inspect, orthanc has 2 distinct IP in each of these networks. Which one should I use or none of these addresses should be used at all? (Please refer to following question first)

I want to add a modality to orthanc. The modality is a SCP. Normally, these SCP are identified by {AET, IP, Port#}
Suppose I have this modality container services defined in same docker-compose.yml as orthanc & the name of this container service is “arc” (and its AET is DCM4CHEE & its port is 11112).
So, based on the examples in this file, I should have something like this:
“arc”: [ “DCM4CHEE”, “IP”, 11112]

Q4/ What “IP” address should I use?

Should it be 192.168.33.10 (the private network address I defined in the vagrantfile) or it should be the internal container IP address of this “arc” service - the one the docker assigned to the docker bridge network for this service or the IP should be 127.0.0.1? (I grouped the arc in the “backend network”.)
I need to tell arc to listen to Orthanc (So, I have to give arc the AET, IP, port # of Orthanc) and vice versa.

I intend to push DICOM images between these 2 SCP (Orthanc & arc).

Thanks in advance

Hi,

Your questions are more related to nginx and docker than Orthanc, but anyway…

Q1/ if you don’t specify any port, nginx will use the default port 80. You can add a line with listen 12345; if you wish to listen on port 12345 instead for example.

Q2/ when you specify http://orthanc:8042 then Docker will first use its bridge DNS to resolve the IP address of the Docker service named orthanc. In order to work, you must have the orthanc service running in the same docker network as nginx. To have the port 8042 open in Orthanc, you’ll need to have RemoteAccessAllowed set to true.

Q3/ the IP address assigned to the orthanc service by the docker bridge network. But you can also use the service name to be correctly interpreted by docker.
If “arc” is defined in the same docker compose file, you can set this:
“arc”: [ “DCM4CHEE”, “arc”, 11112]

Q4/ you should use the docker compose file service name “arc” as the IP address.

Cheers,

Michel