Configuration using YAML file

YAML defines a text-file-format (typical file extensions used are .yaml and .yml) for configuration parameters with a hierarchical order by line intend. There is always one parameter setting per row only.

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

 

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

Using the file name viewer.yml is good practice to ease maintenance.

Example tia Viewer configuration file:

tia: destinations: saphttp: host: contentservevr.kgs.local port: 8090 repositoryinstancemapping: FI: finance HR: finance TR: default ZI: production instances: default: watermark: text: "copy" sap: url: "https://sapServer:8400/tia/tia_viewer?sap-client=250" username: secuser password: s3cret mimetypes: - application/pdf finance: downloadDocument: false text: "confidential" production: printDocumentNote: false mimetypes.0: application/pdf

 

  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_ADDITIONALLOCATION environment variable.

Example docker compose file to load YAML file configuration:

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_ADDITIONALLOCATION: /app/config/viewer.yml