Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

tia Viewer Core settings may be specified either by environmental environment variables in the container context or by providing a YAML configuration file.

  • When using environmental environment variables the pure amount of settings can cause long command lines (e.g. docker run) that are hard to maintain. Using a file-based approach (e.g. docker compose) is easier to maintain.

  • When using YAML configuration file, there is only one environmental environment variable to be set in order to include the YAML into startup procedure:

...

The YAML file is then easy to read and maintain.

Configuration using

...

environment variables

As environmental environment variables do not have any hierarchical order, the tia Viewer parameters must be qualified completely:

...

Info

While tia Viewer Core parameter names are case-sensitive and use the . (dot) character, environmental environment variables must be all uppercase and use _ (underscore) character instead of . .

Example for a docker-compose file with configuration using environmental environment variables:

Code Block
version: '3'
services:

  tiaviewer:
    container_name: tiaviewer
    image: images.docker.kgs-cloud.de/tia-viewer/archivelink-oidc:latest
    ports:
      - "8080:8080"
    environment:
      TIA_DESTINATIONS_SAPHTTP_HOST: contentservevr.kgs.local
      TIA_DESTINATIONS_SAPHTTP_PORT: 8090
      TIA_INSTANCES_DEFAULT_WATERMARK_TEXT: copy
      TIA_INSTANCES_DEFAULT_SAP_URL: https://sapServer:8400/tia/tia_viewer?sap-client=250
      TIA_INSTANCES_DEFAULT_SAP_USERNAME: secuser
      TIA_INSTANCES_DEFAULT_SAP_PASSWORD: s3cret
      TIA_INSTANCES_DEFAULT_MIMETYPES_0: application/pdf   
      TIA_INSTANCES_HR_DOWNLOADDOCUMENT: false
      TIA_INSTANCES_FI_TEXT: confidential    
      TIA_INSTANCES_FO_PRINTDOCUMENTNODE: false
      TIA_INSTANCES_FO_MIMETYPES_0: application/pdf

...

By the parent section and the intend before the parameter name hierarchical order is specified and replace the prefixes as used with environmental environment variables.

  1. Prepare the YAML file in the directory of choice at the host

...

  1. Map the configuration file into the container context, and included into tia Viewer Core start procedure by specifying its location to the SPRING_CONFIG_ADDITIONAL-LOCATION environmental environment variable.

Example docker compose file to load YAML file configuration:

Code Block
version: '3'
services:

  tiaviewer:
    container_name: tiaviewer
    image: http://images.docker.kgs-cloud.de/tia-viewer/archivelink-oidc:latest 
    ports:
      - "8080:8080"
    volumes:
      ./viewer.yml: /app/config/viewer.yml
    environment:
      SPRING_CONFIG_ADDITIONAL-LOCATION: /app/config/viewer.yml 

...