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. diff --git a/caMicroscope.yml b/caMicroscope.yml index bfee216..57868a9 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/ + - ./config/OrthancConfiguration.json:/root/src/Configuration.json + environment: + DICOM_PORT: "11112" + DICOM_UI_PORT: "8042" + CARACAL_BACK_HOST_PORT: "ca-back:4010" diff --git a/config/OrthancConfiguration.json b/config/OrthancConfiguration.json new file mode 100644 index 0000000..3a9d09b --- /dev/null +++ b/config/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 +} 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"]} + ] } ] diff --git a/develop.yml b/develop.yml index e25fc62..9ad7486 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/ + - ./config/OrthancConfiguration.json:/root/src/Configuration.json + environment: + DICOM_PORT: "11112" + DICOM_UI_PORT: "8042" + CARACAL_BACK_HOST_PORT: "ca-back:4010"