imaging-viewer .env file


Overview

The imaging-viewer component relies on environment variables/options defined in a .env file located here:

/opt/cast/installation/imaging-viewer/

These variables/options configure service discovery, APIs, AI Manager, ETL, Server, Neo4j, and Docker images. Below is a detailed explanation of each option.

Eureka (Service Discovery)

Variable Default/Example Description
SERVICE_HOST FQDN Hostname or IP address where “imaging-viewer” services can be discovered.
EUREKA_HOST FQDN Host address for the Eureka server.
EUREKA_PORT 8098 Port where Eureka is running.

CAST Imaging APIs

Variable Default/Example Description
IMAGING_APIS_PORT 8070 Port for CAST Imaging API service.
API_KEY (empty) API key for authentication (set in production).
SOURCE_CODE_SERVICE_TOKEN (empty) Token for connecting to source code service.
SOURCE_CODE_SERVICE_ENDPOINT (empty) URL/endpoint for source code service.
TRUSTED_PROXIES (empty) Comma-separated list of trusted proxy IPs.
ACCESS_CONTROL_ALLOW_ORIGIN (empty) Allowed CORS origin(s).
ACCESS_CONTROL_ALLOW_METHODS (empty) Allowed HTTP methods for CORS.
ACCESS_CONTROL_ALLOW_HEADERS (empty) Allowed request headers for CORS.

CAST Imaging AI Manager

Variable Default/Example Description
AIMANAGER_PORT 8082 Port for AI Manager service.
DB_HOST csshost Hostname of the postgres database.
DB_PORT 2284 Postgres Database port.
DB_USER user Postgres Database username.
DB_PASSWORD password Postgres Database password.
DB_SCHEMA postgres Postgres Database schema name

CAST Imaging ETL

Variable Default/Example Description
ETL_PORT 9001 Port for ETL service.
WORKER_POOL_SIZE 4 Allowed number of parallel threads (imports)
NEO4J_IMPORT_BATCH_SIZE 1000 Batch size for importing data into Neo4j.

CAST Imaging Service (Backend + Frontend)

Variable Default/Example Description
SERVER_PORT 9000 Port for CAST Imaging Viewer backend service.
FE_PORT 8083 Port for CAST Imaging Viewer frontend UI.
APP_CONTEXT (empty) Optional application context path (e.g., /cast).

CAST Imaging Neo4j Database

Variable Default/Example Description
NEO4J_HTTP_PORT 7474 Neo4j HTTP port (browser access).
NEO4J_BOLT_PORT 7687 Neo4j Bolt driver port (used by services).
NEO4J_HEAP_SIZE 12G Heap size allocated for Neo4j. This option sets both the server.memory.heap.initial_size and server.memory.heap.max_size options available in the neo4j.conf to the same value.
NEO4J_TRANSACTION_MEMORY 10G Maximum total memory all concurrent transactions can consume, preventing OutOfMemory errors by capping transaction resource usage. Equivalent to dbms.memory.transaction.total.max available in the neo4j.conf.
NEO4J_BOLT_ENDPOINT neo4j:7687 Neo4j Bolt endpoint (must align with NEO4J_BOLT_PORT).

Docker Images & Repository

Variable Default/Example Description
ETL_IMAGE_TAG latest Tag for ETL image.
SERVER_IMAGE_TAG latest Tag for Server image.
NEO4J_IMAGE_TAG latest Tag for Neo4j image.
AIMANAGER_IMAGE_TAG latest Tag for AI Manager image.
IMAGING_API_IMAGE_TAG latest Tag for Imaging API image.
DOCKER_REPO castimaging Docker repository name.

Common Settings

Variable Default/Example Description
QUERY_TIMEOUT 60 Query timeout (seconds).
LOG_LEVEL debug Logging level (info or debug).
TIME_ZONE UTC Default time zone for services.