From cfa1973f7e9e00da6f36a0b422af6be30332b9d7 Mon Sep 17 00:00:00 2001 From: CGDogan <126820728+CGDogan@users.noreply.github.com> Date: Mon, 18 Sep 2023 14:25:13 +0100 Subject: [PATCH 1/5] Update routes.json --- config/routes.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/config/routes.json b/config/routes.json index 8728200..4c0fcfa 100644 --- a/config/routes.json +++ b/config/routes.json @@ -498,5 +498,17 @@ {"function":"permissionHandler", "args": [["Admin", "Editor"]]}, {"function":"sendTrainedModel", "args": []} ] + },{ + "route":"/fs/addedFile", + "method":"get", + "handlers":[ + {"function":"addedFileToFS", "args": ["camic", "slide", "http://ca-load:4000"]} + ] + },{ + "route":"/fs/deletedFile", + "method":"get", + "handlers":[ + {"function":"removedFileFromFS", "args": ["camic", "slide", "http://ca-load:4000"]} + ] } ] From b4f2eb441a4f343ad3bfba410da5a930a668fa5d Mon Sep 17 00:00:00 2001 From: CGDogan <126820728+CGDogan@users.noreply.github.com> Date: Mon, 18 Sep 2023 14:28:45 +0100 Subject: [PATCH 2/5] yml files --- caMicroscope.yml | 20 ++++++++++++++++++++ develop.yml | 20 ++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/caMicroscope.yml b/caMicroscope.yml index bfee216..a7e197e 100644 --- a/caMicroscope.yml +++ b/caMicroscope.yml @@ -58,3 +58,23 @@ services: max-size: "10m" volumes: - ./images/:/images/ + environment: + DICOM_PORT: "11112" + DICOM_UI_PORT: "8042" + dicomsrv: + build: "https://github.com/camicroscope/dicomsrv.git" + container_name: ca-dicomsrv + restart: unless-stopped + stdin_open: true + tty: true + ports: + - "8042:8042" + - "11112:11112" + volumes: + - ./jwt_keys/:/root/keys/ + - ./images/:/images/ + - ./OrthancConfiguration.json:/root/src/Configuration.json + environment: + DICOM_PORT: "11112" + DICOM_UI_PORT: "8042" + CARACAL_BACK_HOST_PORT: "ca-back:4010" diff --git a/develop.yml b/develop.yml index e25fc62..ee20984 100644 --- a/develop.yml +++ b/develop.yml @@ -40,3 +40,23 @@ services: volumes: - ./images/:/images/ - ./cloud-upload-apis/:/cloud-upload-apis/ + environment: + DICOM_PORT: "11112" + DICOM_UI_PORT: "8042" + dicomsrv: + build: "https://github.com/camicroscope/dicomsrv.git" + container_name: ca-dicomsrv + restart: unless-stopped + stdin_open: true + tty: true + ports: + - "8042:8042" + - "11112:11112" + volumes: + - ./jwt_keys/:/root/keys/ + - ./images/:/images/ + - ./OrthancConfiguration.json:/root/src/Configuration.json + environment: + DICOM_PORT: "11112" + DICOM_UI_PORT: "8042" + CARACAL_BACK_HOST_PORT: "ca-back:4010" From db35bce79b999b068fafcb9eac24d3d7654a17b8 Mon Sep 17 00:00:00 2001 From: CGDogan <126820728+CGDogan@users.noreply.github.com> Date: Mon, 18 Sep 2023 14:45:28 +0100 Subject: [PATCH 3/5] Memory requirement for Orthanc --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 225986d..a2fdd34 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,8 @@ Use `docker-compose -f caMicroscope.yml build` to rebuild the services. Once everything is up, go to http://localhost:4010/ to see the landing page. +6GB memory is recommended (in total, 2GB RAM + 4GB swap should work well) + ## SSL To enable ssl, mount the private key and certificate files to the ca-back service in /root/src/ssl/privatekey.pem and /root/src/ssl/certificate.pem respectively. HTTPS mode will only be enabled if both of these files are present. From c372e81e361580609d472928d6fd17468443271d Mon Sep 17 00:00:00 2001 From: CGDogan <126820728+CGDogan@users.noreply.github.com> Date: Mon, 18 Sep 2023 14:46:47 +0100 Subject: [PATCH 4/5] Create OrthancConfiguration.json --- OrthancConfiguration.json | 64 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 OrthancConfiguration.json diff --git a/OrthancConfiguration.json b/OrthancConfiguration.json new file mode 100644 index 0000000..3a9d09b --- /dev/null +++ b/OrthancConfiguration.json @@ -0,0 +1,64 @@ +{ + // https://hg.orthanc-server.com/orthanc/file/Orthanc-1.12.1/OrthancServer/Resources/Configuration.json + // Configuration.json supports importing ENV vars with ${YourEnvVarName} + // NOTE about file paths: /images/ and all paths in this file starting with /root + // are set correctly to match what caMicroscope Dockerfiles set up. + // Changing these might cause issues. Besides, Dockerfiles will copy + // OrthancConfiguration.json from caMicroscope/Distro as well so please don't rename this file. + "Plugins" : [ + "/root/src/libOrthancIndexer.so" + ], + "Indexer" : { + "Enable" : true, + "Folders" : ["/images/"], + "Interval" : 10 // Delay between two synchronizations (seconds) + }, + "StorageCompression" : false, // "true" is incompatible with caMicroscope + "Name" : "camic-orthanc", + "DicomAet" : "CAMIC-ORTHANC", + "StorageDirectory" : "/images/", + "IndexDirectory" : "/root/orthanc-index", + "HttpServerEnabled" : true, // Rest API and GUI + "OrthancExplorerEnabled" : true, // GUI + "HttpPort" : ${DICOM_UI_PORT}, // Rest API and GUI + "RestApiWriteToFileSystemEnabled" : true, // Rest API and GUI + "RemoteAccessAllowed" : true, + "AuthenticationEnabled" : false, // Basic HTTP auth for GUI as in http://httpbin.org/basic-auth/foo/bar + //"RegisteredUsers" : { + // "alice" : "alicePassword" + //}, + "SslEnabled" : false, // HTTP server + "SslCertificate" : "/root/keys/keyandpub.pem", // both cert and private key + "HttpsVerifyPeers" : true, // Verify SSL of other orthanc servers + + "MallocArenaMax" : 5, // Suggested by docs to regulate memory use + "DicomThreadsCount" : 3, + + "DicomPort" : ${DICOM_PORT}, + + // NOTE: Due to a bug in Orthanc 1.12.1 and lower, to disable DICOM TLS, + // "DicomTlsEnabled" : false is not enough; please also comment out the line with + // DicomTlsPrivateKey + "DicomTlsEnabled" : false, // DICOM server + // For DICOM, unlike HTTP, cert (cer or cert or pub or pem) and pkey need to be provided as separate files. + // For example, the latter means that when the file is opened with a text editor, + // there's "BEGIN PRIVATE KEY" and "BEGIN CERTIFICATE" in the same file. + //"DicomTlsPrivateKey" : "/root/keys/key", + "DicomTlsCertificate" : "/root/keys/key.pub", + "DicomTlsRemoteCertificateRequired" : true, // Verify certificate of dicom peers + + // AlwaysAllow: If false, only those listed under "DicomModalities" will be capable of these + "DicomAlwaysAllowStore" : true, + // The following ones allow retrieving data, which you might not want everyone to do + "DicomAlwaysAllowFind" : true, + "DicomAlwaysAllowFindWorklist" : true, + "DicomAlwaysAllowGet" : true, + "DicomAlwaysAllowMove" : true, + + //"DicomModalities" : { + // AET, IP, port + // "sample" : ["MYSRV", "192.168.1.40", 1300] + // See the link at the beginning of the file for selectively giving permissions + //}, + "DicomCheckModalityHost" : false // Check the IP as well or only check the modality +} From 9f4db2058abe55d37683bb30108a5f907ba160ec Mon Sep 17 00:00:00 2001 From: CGDogan <126820728+CGDogan@users.noreply.github.com> Date: Mon, 18 Sep 2023 14:51:59 +0100 Subject: [PATCH 5/5] config json fits better in "config/" --- caMicroscope.yml | 2 +- OrthancConfiguration.json => config/OrthancConfiguration.json | 0 develop.yml | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename OrthancConfiguration.json => config/OrthancConfiguration.json (100%) diff --git a/caMicroscope.yml b/caMicroscope.yml index a7e197e..57868a9 100644 --- a/caMicroscope.yml +++ b/caMicroscope.yml @@ -73,7 +73,7 @@ services: volumes: - ./jwt_keys/:/root/keys/ - ./images/:/images/ - - ./OrthancConfiguration.json:/root/src/Configuration.json + - ./config/OrthancConfiguration.json:/root/src/Configuration.json environment: DICOM_PORT: "11112" DICOM_UI_PORT: "8042" diff --git a/OrthancConfiguration.json b/config/OrthancConfiguration.json similarity index 100% rename from OrthancConfiguration.json rename to config/OrthancConfiguration.json diff --git a/develop.yml b/develop.yml index ee20984..9ad7486 100644 --- a/develop.yml +++ b/develop.yml @@ -55,7 +55,7 @@ services: volumes: - ./jwt_keys/:/root/keys/ - ./images/:/images/ - - ./OrthancConfiguration.json:/root/src/Configuration.json + - ./config/OrthancConfiguration.json:/root/src/Configuration.json environment: DICOM_PORT: "11112" DICOM_UI_PORT: "8042"