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.

  • When using 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 environment variable to be set in order to include the YAML into startup procedure:

SPRING_CONFIG_ADDITIONAL-LOCATION

...

kgs recommends to use YAML configuration file with following reasoning

  • YAML files are easy to read and maintain.

  • Using a large number of environment variables is more problematic to maintain. Case-conversion required makes them hard to handle.

Configuration using environment variables

...

Info

While tia Viewer Core parameter names are case-sensitive and use the . (dot) character. Depending on the operating systems, environment variables must be all uppercase and use _ (underscore) character instead of . , and conversion to parameters then convert the names to all-lowercase.

Example for a docker-compose file with configuration using 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.repositoryinstancemapping.FI: finance
      tia.repositoryinstancemapping.HR: finance
      tia.repositoryinstancemapping.FO: production
      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_DOWNLOADDOCUMENTtia.instances.finance.downloadDocument: false
      TIA_INSTANCES_FI_TEXTtia.instances.finance.text: confidential    
      TIA_INSTANCES_FO_PRINTDOCUMENTNODEtia.instances.production.printDocumentNote: false
      TIA_INSTANCES_FO_MIMETYPEStia.instances.production.mimetypes_0: application/pdf

Configuration using YAML file

...