Managing config files

Available from ≥ 3.5.0-funcrel

Overview

CAST components (imaging-viewer for example) include various services (such as neo4j) which have their own configuration files. While many options for these services are exposed in files such as docker-compose.yml or .env, others are not and remain within the service’s container and therefore a special process is required if any of these service specific options need customizing. This is explained below.

General process

  • Copy the configuration file from the container to an editable location on the local disk
  • Create a backup of this copied file
  • Edit the original copied configuration file to add your changes
  • Mount the updated configuration file using the docker-compose.override.yml file
  • Restart the service container

Examples

neo4j.conf

The neo4j.conf file is the main configuration file for neo4j, the graph database used to store CAST Imaging results. It controls how neo4j behaves, performs, and connects to the outside world. To modify it:

  1. Copy the configuration file from the container to the current folder:
$ sudo docker cp neo4j:/var/lib/neo4j/config/configuration/neo4j.conf .
  1. Create a backup in the current folder:
$ sudo cp neo4j.conf neo4j.conf.backup
  1. Edit the copied configuration file according to your requirements, following Neo4j configuration syntax.

  2. Mount the updated file via Docker Compose by adding the following volume mapping to your docker-compose.override.yml file (update the path preceding the : to match the location of the local configuration file) located in /opt/cast/installation/imaging-viewer:

services:
    neo4j:
        volumes:
            - ./neo4j.conf:/var/lib/neo4j/config/configuration/neo4j.conf
  1. Restart the container:
$ cd /opt/cast/installation/imaging-viewer
$ sudo docker compose up -d neo4j

app-config.js

The app-config.js file is used to define custom language settings - see Configure a custom language display:

  1. Copy the configuration file from the container to the current folder:
$ sudo docker cp server:/opt/imaging/web/dist/app-config.js .
  1. Create a backup in the current folder:
$ sudo cp app-config.js app-config.js.backup
  1. Edit the copied configuration file according to your requirements.

  2. Mount the updated file via Docker Compose: by adding the following volume mapping to your docker-compose.override.yml file (update the path preceding the : to match the location of the local configuration file) located in /opt/cast/installation/imaging-viewer:

services:
    server:
        volumes:
            - ./app-config.js:/opt/imaging/web/dist/app-config.js
  1. Restart the container:
$ cd /opt/cast/installation/imaging-viewer
$ sudo docker compose up -d server

app.config

  1. Copy the configuration file from the container to the current folder:
$ sudo docker cp server:/opt/imaging/imaging-service/app.config .
  1. Create a backup in the current folder:
$ sudo cp app.config app.config.backup
  1. Edit the copied configuration file according to your requirements.

  2. Mount the updated file via Docker Compose: by adding the following volume mapping to your docker-compose.override.yml file (update the path preceding the : to match the location of the local configuration file) located in /opt/cast/installation/imaging-viewer:

services:
    server:
        volumes:
            - ./app.config:/opt/imaging/web/dist/app.config
  1. Restart the container:
$ cd /opt/cast/installation/imaging-viewer
$ sudo docker compose up -d server

nginx.conf / proxy.conf

The nginx.conf / proxy.conf files are the main configuration files for Nginx, used as the front-end web server for the imaging-viewer component:

  1. Copy the configuration file from the container to the current folder:
$ sudo docker cp server:/opt/imaging/config/nginx/conf/nginx.conf .
$ sudo docker cp server:/opt/imaging/config/nginx/conf/proxy.conf .
  1. Create a backup in the current folder:
$ cp nginx.conf nginx.conf.backup
$ cp proxy.conf proxy.conf.backup
  1. Edit the copied configuration file according to your requirements.

  2. Mount the updated file via Docker Compose: by adding the following volume mapping to your docker-compose.override.yml file (update the path preceding the : to match the location of the local configuration file) located in /opt/cast/installation/imaging-viewer:

services:
    server:
        volumes:
            - ./nginx.conf:/opt/imaging/config/nginx/conf/nginx.conf
            - ./proxy.conf:/opt/imaging/config/nginx/conf/proxy.conf
  1. Restart the container:
$ cd /opt/cast/installation/imaging-viewer
$ sudo docker compose up -d server

The ETL (Extract Transform Load) service takes data produced during an analysis and transforms and uploads it into neo4j for results consumption. The following configuration files can be edited:

  • custom-levels.json
  • queries.json
  1. Copy the configuration file from the container to the current folder:
$ sudo docker cp etl:/opt/imaging/imaging-etl/custom-levels.json .
$ sudo docker cp etl:/opt/imaging/imaging-etl/web-service-linker/venv/bin/queries.json .
  1. Create a backup in the current folder:
$ sudo cp custom-levels.json custom-levels.json.backup
$ sudo cp queries.json queries.json.backup
  1. Edit the copied configuration file according to your requirements.

  2. Mount the updated file via Docker Compose: by adding the following volume mapping to your docker-compose.override.yml file (update the path preceding the : to match the location of the local configuration file) located in /opt/cast/installation/imaging-viewer:

services:
    etl:
        volumes:
            - ./custom-levels.json:/opt/imaging/imaging-etl/custom-levels.json
            - ./queries.json:/opt/imaging/imaging-etl/web-service-linker/venv/bin/queries.json
  1. Restart the container:
$ cd /opt/cast/installation/imaging-viewer
$ sudo docker compose up -d etl