fli-iam / shanoir-ng

Shanoir (SHAring iN vivO Imaging Resources)
GNU General Public License v3.0
22 stars 22 forks source link

avoid storing the pacs hostname in dataset_file #307

Open a-ba opened 4 years ago

a-ba commented 4 years ago

304 makes the docker images independent from the runtime config. However the solution is not complete because shanoir stores the actual pacs hostname in urls stored in dataset_file (which is problematic because this table is huge and we need to change this value each time we

take a snapshot for deploying in qualif/preprod)

Eg:

| id | pacs | path                                                                                                                                                                                                                                                                                                                     | dataset_expression_id |
|  1 |     | http://dcm4chee-arc:8081/dcm4chee-arc/aets/DCM4CHEE/wado?requestType=WADO&studyUID=1.4.9.12.34.1.8527.6157462203445919659356214839973999866637&seriesUID=1.4.9.12.34.1.8527.4241104618888898442369415137472657132069&objectUID=1.4.9.12.34.1.8527.8245005597514751000133514797283422686941&contentType=application/dicom |                     1 |
|  2 |     | http://dcm4chee-arc:8081/dcm4chee-arc/aets/DCM4CHEE/wado?requestType=WADO&studyUID=1.4.9.12.34.1.8527.6157462203445919659356214839973999866637&seriesUID=1.4.9.12.34.1.8527.4241104618888898442369415137472657132069&objectUID=1.4.9.12.34.1.8527.4239942259053422501182273486821672881780&contentType=application/dicom |                     1 |

In shanoir-old we used to rely on docker legacy link to avoid storing the hostname in the db (the urls were just http://pacs/...).

I would like to avoid legacy links (as they may disappear sometime in the future).

One possible solution would be to store a dummy url in the db, and generate the real url at runtime using the config keys dcm4chee-arc.{host,port.web,dicom-wado-uri.

eg: store the url as wado://?requestType... instead of http://dcm4chee-arc:8081/dcm4chee-arc/aets/DCM4CHEE/wado?requestType...

a-ba commented 4 years ago

I have just noticed that docker now supports network scoped aliases. We can use this feature to overcome the problem. https://docs.docker.com/engine/reference/commandline/network_connect/

michaelkain commented 4 years ago

great, good to know