Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with raccon initiation in docker #11

Open
Francescodotta opened this issue Feb 28, 2023 · 1 comment
Open

Problem with raccon initiation in docker #11

Francescodotta opened this issue Feb 28, 2023 · 1 comment

Comments

@Francescodotta
Copy link

Francescodotta commented Feb 28, 2023

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
Copy link
Member

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

  • Copy .env.template and rename it to .env
  • Change .env content
MONGODB_NAME="raccoon"
MONGODB_HOSTS=["mongodb"]
MONGODB_PORTS=[27017]
MONGODB_USER="root"
MONGODB_PASSWORD="Raccoon#Admin2Mongo"
MONGODB_SLAVEMODE=false

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
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"
    }
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants