Configuration (tWC)
The service is mainly configured by application.yml.
Container configuration
Containers in first place are configured by environment variables.
But still you can use 2 approaches while the first one is the preferred one.
1. approach - all configurations made by environment
this way is preferred even because kubernetes can use config maps
Spring takes settings fron environment. Please take a look into https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#features.external-config
this converts e.g. an configuration like server.port into SERVER_PORT
2. approach - map volume with config file
map a volume mount into the container
put the application.properties/yml into it
point in a environment variable to the used mount point by setting the evironment vaiable SPRING_CONFIG_LOCATION
in docker-compose it could look like this
services: app: image: my-spring-app environment: - SPRING_CONFIG_LOCATION=file:/application/config/ volumes: - ./config:/application/config
Application configuration
Spring application properties
As mentioned in Configuration (SOAP/AL) | Container configuration the config can be set in 2 ways. Here the config items are described:
config item | type | valid values | default | example | Description |
|---|---|---|---|---|---|
server.port | int | 1..65535 | 8080 | 7090 | The port on which the application will be listening on. Has to map the port mapping for container. |
spring.context-path | string |
| webservice | webservice | The context path |
tia.soap.al.keystore | string |
|
| /application/work/keystore.pkcs12 | The location of the key store. If the parameter is not configured (the config line does not exist), a default keystore with basic KGS Test-Certificates is used. This default configuration should only be used for testing purposes. |
logging.level.com.software.kgs | string | WARN, ERROR, INFO, DEBUG | DEBUG |
| The log level |
tia.soap.al.security.accessSecrets.createDuringStartup | boolean | true, false | true |
| If security is used, it write the securities or not. Securities are derived from used private key and certificate configured for this instance. |
tia.soap.al.security.accessSecrets.destinationFile | string |
|
| /application/work/mySecrets.txt | The destination file where the secrets will be written. Destination shall be a bind mount. |
tia.soap.al.instances.{I}.async.directory | string | valid existing path |
| /tmp/dr1/inst1/input | for DR scenarios. A tia document router is watching this folder |
tia.soap.al.instances.{I}.async.dataPrefix | string |
|
| data_ | a prefix for data file can be given. |
tia.soap.al.instances.{I}.async.indexSuffix | string |
|
| idx | If an index file shall be written, an index suffix has to be given. It will be the file suffix for the created index file. If not given, no index file is written.
The index schema inside is : datafile|repo|docId|compId|size |
tia.soap.al.instances.{I}.archiveLink.repo | string |
|
| FI | Destination (CS) repository for instance {I} |
tia.soap.al.instances.{I}.archiveLink.host | string |
|
| host.docker.internal 195.166.10.22 | Destination (CS) host for instance {I} |
tia.soap.al.instances.{I}.archiveLink.port | int | 80..65535 |
| 8093 | Destination (CS) port for instance {I} |
tia.soap.al.instances.{I}.archiveLink.protocol | string | http, https |
| https | Destination (CS)protocol for instance {I} |
tia.soap.al.instances.{I}.archiveLink.path | string |
|
| /contentserver | Destination (CS) context path for instance {I} |
tia.soap.al.instances.{I}.security.securityEnabled | boolean | true, false |
|
| If security is used. If false, the other security parameters doesn’t need to be set. If enabled, at startup the tia webservice core tries to send the selected certificate |
tia.soap.al.instances.{I}.security.keyStoreAlias | string |
| kgs | kgs | Destination key store alias for instance {I}. The alias for the private key and certificate pair of the instance. Also used for access key calculation |
tia.soap.al.instances.{I}.security.certificateAuthId | string |
|
|
| A destination certificate is used by config item keyStoreAlias. Normally the authId is taken from certificates CN. But for archive link auth id (secKey calculation) this can be overwritten for accessing content server. This parameter sets the used authId. |
management.endpoints.web.exposure.include |
|
|
|
| Cloud relevant health and metrics endpoints |
tia.soap.al.instances.{I}.allowed.serverinfo | Boolean | true, false | false |
| Option indicates whether serverinfo-requests are to be forwarded to Content Server. from Version 1.1.0 |
tia.soap.al.instances.{I}.allowed.info | Boolean | true, false | false |
| Option indicates whether info-requests are to be forwarded to Content Server. from Version 1.1.0 |
tia.soap.al.instances.{I}.allowed.create | Boolean | true, false | false |
| Option indicates whether create-requests are to be forwarded to Content Server. from Version 1.1.0 |
tia.soap.al.instances.{I}.allowed.delete | Boolean | true, false | false |
| Option indicates whether delete-requests are to be forwarded to Content Server. from Version 1.1.0 |
tia.soap.al.instances.{I}.allowed.get | Boolean | true, false | false |
| Option indicates whether get-requests are to be forwarded to Content Server. from Version 1.1.0 |
tia.soap.al.instances.{I}.allowed.getAll | Boolean | true, false | false |
| Option indicates whether getAll-requests are to be forwarded to Content Server. from Version 1.1.0 |
management.endpoints.web.exposure.include |
|
|
|
| Cloud relevant health and metrics endpoints |
Example config
Mime type mapping
Per default there is an inbuilt mime mapping. This can be overwritten by setting the property soap.al.customMimeTypeMapping.
For this you need to use the 2nd approach from https://kgs-software.atlassian.net/wiki/spaces/DOCUEN/pages/4029579301/Configuration+tWC#2.-approach---map-volume-with-config-file in order to map the config file onto the container.