Docker Container File Changes
  • 07 Jul 2022
  • 2 Minutes to read
  • Dark
    Light

Docker Container File Changes

  • Dark
    Light

Article Summary

Once the Docker module has been installed. There are some additional configurations needed for the container. Most of these configuration changes are translating properties from the Settings.xml into variables for an environment file. In addition to creating an environment file, ports 80 and 443 will need to be exposed when utilizing containers.

Saving persistent data
Since containers can be destroyed and recreated at any time, it can be difficult to store persistent data. In order to preserve persistent data, the data volume needs to be mapped to a physical location. This is done through the DECISIONS_FILESTORAGELOCATION variable. For example, if the value specified for the DECISIONS_FILESTORAGELOCATION is /filestorage, then the volume mapping command will look like -v /home/filestorage:/filestorage. We can refer to the official Docker documentation for more information on volume mapping.

Environment File changes

In order to fully utilize Decisions inside a Docker container, the user will need to make configuration changes to the container. These properties will be defined using the following convention: DECISIONS_propertyname. For example, the DatabaseConnectString property in the Settings.xml file will be translated as DECISIONS_DATABASECONNECTSTRING

Below are some common properties along with an example that needs to be defined in the environment file. 

The COMPlus_GCHeapHardLimitPercent environment variable must be specifed and set as 4B.
Settings.xml propertyEnvironment variable nameExample
DatabaseConnectStringDECISIONS_DATABASECONNECTSTRINGDECISIONS_DATABASECONNECTSTRING=Data Source=(local)\SQLEXPRESS;Initial Catalog=decisions;Integrated Security=False;User ID=test;Password=test
FileStorageLocationDECISIONS_FILESTORAGELOCATIONDECISIONS_FILESTORAGELOCATION=/Decisionsfilestorage
PortalBaseURLDECISIONS_PORTALBASEURLDECISIONS_PORTALBASEURL=http://localhost
DatabaseTypeDECISIONS_DATABASETYPEDECISIONS_DATABASETYPE=MSSQL

In addition, we can set the language and timezone for the container. This can be done by defining environment variables for these settings.

Environment variableUseExample
TZDefines the timezone for the environment. By default, the timezone will be in UTC.TZ=Asia/KolKata, TZ=America/New_York
LANGContains the setting for all categories not directly set by LC_ALLLANG=en_US.UTF-8
LANGUAGEUsed to set multiple languages for messagesLANGUAGE=en_US:en:fr
LC_ALLUsed to override LANG and LANGUAGE settingsLC_ALL=en_US.UTF-8

Additional configuration

Below are changes needed for specific modules or features in order to utilize them for a container.

SAML Module

In the SAML settings, the X.509 certificate requires ----BEGIN CERTIFICATE---— and ----END CERTIFICATE---— otherwise an invalid certificate error will be thrown.

WordToPDF Module

In order to utilize the module. A custom font needs to be added. This is due to the module using a Windows native font, which is not supported in Linux. In order to add the font:

  1. Create a folder path. This path will need to be volume mapped for the environment
  2. Copy the .TTF and .TTC  files from C:\Windows\Fonts into the directory
    • An easy way to accomplish this is to copy the needed files from a Windows environment and store them in a directory on the Linux machine.

Afterward, verify whether the font licensing is required, and read the EULA carefully before installing the MS Font on the Linux machine


External Form

Since the file path for a Linux operating system is case-sensitive, ensure that the Javascript paths for the external form have the correct casing.


Less files

In order to customize less files, the wwwroot/styles/less folder needs to be volume mapped to a physical file path for the container


Decisions Agents

The Download Agent button will not download the DecisionsAgent.msi in the container. In order to retrieve the .msi, it must be downloaded from the release site.


HL7 Module

The HL7 module requires that extra ports need to be open and exposed. This can be done by running the Docker expose commands. Ports can be opened using the following command:

—expose=port_number

Afterward, the port can be published and mapped to the container. This is done by the below command.

-p portnumber:portnumber



Was this article helpful?