Versions Compared

Key

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

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

kgs recommends to use YAML configuration file with following reasoning

...

YAML files are easy to read and maintain.

...

:

  • configuration by environment variables is only viable for minimal configurations

  • configuration by YAML configuration file is required when requiring configuring of instances and more. Here only one environment variable to point to the YAML file is required (SPRING_CONFIG_ADDITIONALLOCATION).

Configuration using environment variables

...

Info

While tia Viewer Core parameter names are case-sensitive and use the . (dot) character. Depending on the operating systemsof the environment like cloud provider or package manager, environment variables must be all uppercase and , use _ (underscore) character instead of ., and conversion to parameters then convert the names to all-lowercaseremove all - . Case-conversion required in this cases may cause undesired result.

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

...

  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-LOCATIONADDITIONALLOCATION 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
      - ./viewerlicense.json:/application/config/license/viewerlicense.json
    environment:
      SPRING_CONFIG_ADDITIONAL-LOCATIONADDITIONALLOCATION: /app/config/viewer.yml