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.

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_server_memory_heap_initial__size 12G Initial heap size allocated for Neo4j (equivalent to server.memory.heap.initial_size available in the neo4j.conf file). Note the double underscore in use between initial and size. See also Customizing Neo4j.
Available in ≥ 3.5.4-funcrel
NEO4J_server_memory_heap_max__size 12G Max heap size allocated for Neo4j (equivalent to server.memory.heap.max_size available in the neo4j.conf file). Note the double underscore in use between max and size. See also Customizing Neo4j.
Available in ≥ 3.5.4-funcrel
NEO4J_dbms_memory_transaction_total_max 12G 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. See also Customizing Neo4j.
Available in ≥ 3.5.4-funcrel

Note that the following variables were available only in 3.5.0-funcrel - 3.5.4-funcrel:

Variable Default/Example Description
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.

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.
NEO4J_BOLT_ENDPOINT bolt://neo4j:7687 Neo4j Bolt endpoint (must align with NEO4J_BOLT_PORT).
PODMAN_ENV false Specifies whether Podman is the target installation environment.