Use existing storage for images instead of importing which creatures duplicates?

I am trying to figure out how to point the docker container to the folder where the images are, so that I don’t have to import them into the program and create duplicate studies.

What all do I need to do to achieve this? I couldn’t get it to work.

My images are located at: /volume1/homes/aaron/DICOM

Right now I have it running in docker-compose (Portainer stacks):

version: “3.8”
services:
orthanc:
image: orthancteam/orthanc:latest
container_name: orthanc
restart: unless-stopped
ports:
- “8042:8042”
- “4242:4242”
volumes:
- /volume2/docker/orthanc/db:/var/lib/orthanc/db
environment:
ORTHANC__AUTHENTICATION_ENABLED: “false”
ORTHANC__REMOTE_ACCESS_ALLOWED: “true”
STONE_WEB_VIEWER_PLUGIN_ENABLED: “true”
DICOM_WEB_PLUGIN_ENABLED: “true”

Hi @talormanda

You may actually use the Indexer mode of the advanced storage plugin for that.

Then your compose file would look like this (note that you still need /var/lib/orthanc/db to store the SQLite DB but, if you have a large number of files, you should use PostgreSQL):

services:
orthanc:
image: orthancteam/orthanc:latest
container_name: orthanc
restart: unless-stopped
	ports:
	- "8042:8042"
	- "4242:4242"
volumes:
	- /volume2/docker/orthanc/db:/var/lib/orthanc/db
	- /volume1/homes/aaron/DICOM:/aaron-dicom
	
environment:
	STONE_WEB_VIEWER_PLUGIN_ENABLED: "true"
	DICOM_WEB_PLUGIN_ENABLED: "true"
	ORTHANC_JSON: |
	  {
		"AuthenticationEnabled": false,
		"IndexDirectory": "/var/lib/orthanc/db/",
		"AdvancedStorage": {
			"Enable": true,
			"Indexer": {
				"Enable": true,
				"Folders": ["/aaron-dicom"],
				"TakeOwnership": false
			}
		}
	  }

Hope this helps,

Alain.

1 Like

Yes, that works. I just had to modify it a little bit:

services:
  orthanc:
    image: orthancteam/orthanc:latest
    container_name: orthanc
    restart: unless-stopped

    ports:
      - "8042:8042"
      - "4242:4242"

    volumes:
      - /volume2/docker/orthanc/db:/var/lib/orthanc/db
      - /volume1/homes/aaron/DICOM:/aaron-dicom:ro

    environment:
      STONE_WEB_VIEWER_PLUGIN_ENABLED: "true"
      DICOM_WEB_PLUGIN_ENABLED: "true"
      ORTHANC_JSON: |
        {
          "AuthenticationEnabled": false,
          "IndexDirectory": "/var/lib/orthanc/db",
          "AdvancedStorage": {
            "Enable": true,
            "Indexer": {
              "Enable": true,
              "Folders": ["/aaron-dicom"],
              "TakeOwnership": false
            }
          }
        }