cylab-tw / raccoon

Raccoon is a NoSQL-based medical image archive for managing the DICOM images.
MIT License
50 stars 12 forks source link

Problem with raccon initiation in docker #11

Open Francescodotta opened 1 year ago

Francescodotta commented 1 year ago

I tried to build raccoon and mongo by cloning the repository and then starting the two docker container using the command in the terminal

docker-compose up

However it gives me the following error when starting the raccoon container

raccoon    | SyntaxError: Unexpected token u in JSON at position 0
raccoon    |     at JSON.parse (<anonymous>)
raccoon    |     at exports (/nodejs/raccoon/models/mongodb/connector.js:13:24)
raccoon    |     at Object.<anonymous> (/nodejs/raccoon/models/mongodb/index.js:8:52)
raccoon    |     at Module._compile (internal/modules/cjs/loader.js:1114:14)
raccoon    |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
raccoon    |     at Module.load (internal/modules/cjs/loader.js:979:32)
raccoon    |     at Function.Module._load (internal/modules/cjs/loader.js:819:12)
raccoon    |     at Module.require (internal/modules/cjs/loader.js:1003:19)
raccoon    |     at Module.Hook._require.Module.require (/usr/local/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js

Is this error occured previously? How can i fix this? Thanks in advance

Chinlinlee commented 1 year ago

Before deploying, it is necessary to set up the config files. You can copy the template files and modify them.

The following are the configuration for getting started quickly.

Configure .env

SERVER_HOST="0.0.0.0" SERVER_PORT=8081

DICOM_STORE_ROOTPATH='/dicomFiles' DICOMWEB_HOST="localhost" DICOMWEB_PORT=8081 DICOMWEB_API="dicom-web"

FHIRSERVER_HTTP="http" FHIRSERVER_APIPATH="api/fhir" FHIRSERVER_HOST="localhost" FHIRSERVER_PORT=8081 FHIR_NEED_PARSE_PATIENT=true

USE_CONDA=false CONDA_PATH="path/conda.exe" CONDA_GDCM_ENV_NAME ="gdcm"

USE_DCM2JPEG_PYTHONAPI=true DCM2JPEG_PYTHONAPI_HOST="127.0.0.1" DCM2JPEG_PYTHONAPI_PORT=5000


# Configure plugin
- Copy `plugin/config.template.js` and rename to `plugin/config.js`

# Configure front-end
- Copy `public/scripts/config.template.js` and rename to `public/scripts/config.js`
- Change `public/scripts/config.js` content
```js
var envConfig = {
    QIDO: {
        hostName: "127.0.0.1",
        port: "8081",
        api: "dicom-web",
        http: "http"
    },
    WADO: {
        hostName: "127.0.0.1",
        port: "8081",
        api: "dicom-web",
        http: "http"
    },
    FHIR: {
        hostName: "127.0.0.1",
        port: "8081",
        api: "api/fhir",
        http: "http"
    },
    login: {
        enable: false,
        jwt: false //*If true, get token from localStorage and add headers for every requests
    },
    backend: {
        baseUrl: "http://localhost:8081"
    }
};