Decisions Environment Variables
  • 18 Nov 2024
  • 10 Minutes to read
  • Dark
    Light

Decisions Environment Variables

  • Dark
    Light

Article summary

Overview

Environment variables provide a way to configure and customize the behavior of applications inside containers. These variables align with the settings outlined in the Settings.xml file, encompassing tasks such as setting up a container's database connection or configuring HTTPS.

Decisions, when deployed in Containers, follow a pre-configured settings.xml file to deploy it successfully. Although users cannot directly modify the values in the settings.xml, they can override the properties by using environment variables.


Example YAML File

Refer to the following YAML file that includes all the required environment variables to host a container successfully.

version: "3.2"
services:
  decisions-1:
    container_name: Decisions_Test
    image: "decisionscore/platform:latest" 					#navigate to https://hub.docker.com/r/decisionscore/platform/tags to find your prefered build
    ports:
      - "9092:80"
    environment:
      - DECISIONS_DATABASETYPE=MSSQL
      - DECISIONS_DATABASECONNECTSTRING=Data Source=[systemIP];Initial Catalog=11_07;Integrated Security=false;User ID=[user];Password=[password];     
      - DECISIONS_PORTALBASEURL=http://localhost:9092 		#your application host URL. This could also be a FQDN.
      - DECISIONS_ENVIRONMENTNAME=Decisions_Test			#give a unique environment name if container is in cluster
	  - DECISIONS_ADMINISTRATOR_EMAIL=roy@decisions.com		#admin account to login
      - DECISIONS_ADMINISTRATOR_PASSWORD= Roy@123			#password for your admin account		  
      - LANG=en_US.UTF-8
      - LANGUAGE=en_US:en
      - LC_ALL=en_US.UTF-8
      - DECISIONS_LICENSECOMPANYID=119eb5-17a8-11e6-xxx-xxx	#connect with support@decisions.com for your company ID
      - DECISIONS_LICENSECOMPANYNAME=Decisions 				#connect with support@decisions.com for your Company Name
      - DECISIONS_LICENSECONTACTEMAIL=john@email.com 		#email address to receive the License Request Details
      - DECISIONS_LICENSETYPE=EnterpriseNonProduction 		#License type can be EnterpriseNonProduction, EnterpriseProduction,  StandardProduction, StandardNonProduction, Repository, or DisasterRecovery.
    volumes:
        #Volume Mount creation on a local install, Cloud deployed container will be different. Format is [host computer file path]:[file path from inside the container you want to map on the host]
      - [PhysicalFilePath]:/opt/decisions/data

Required Environment Variables

To successfully host a container instance, the following environment variables are necessary.

Note: To configure the Container as required, refer to the later sections in the article.

Environment VariableDescriptionExample Value
DECISIONS_DATABASETYPEConfigures what type of database the Container uses. For more information, refer to Database Server and Configuration.MSSQL / POSTGRES / AZURE
DECISIONS_DATABASECONNECTSTRINGConfigures the Container's connection to its database.Data Source=[systemIP];Initial Catalog=11_07;Integrated Security=false;User ID=[user];Password=[password];
DECISIONS_ADMINISTRATOR_EMAILAllows the creation of an administrator account that will be used to log in to the Portal after completing the hosting process.
Note: This email address will be set as the default email address for sending notification emails. This default email address can be modified in the Portal settings.
roy@decisions.com
DECISIONS_ADMINISTRATOR_PASSWORDProvide the password to the admin email.--
DECISIONS_PORTALBASEURLThis sets up the URL of the Container, which may include the Fully Qualified Domain Address (FQDA).https://decisions.com/

Additional Environment Variables

The following section demonstrates the additional and optional environment variables users might need to configure based on their application's use case.

Securing Decisions Container Environment

To enhance the security of a Decisions Environment within containers, users have the option to incorporate various environment variables, including HTTPS, ForceBaseURI, and many more. For more information, refer to Securing Decisions Container Environment.

Changing the default file storage location

The default file storage location of the Decisions Container is at /opt/decisions/data. Users can use the following variable to change the default location.

Environment VariableDescriptionExample Value
DECISIONS_FILESTORAGELOCATIONConfigures location to allow containers to preserve data.
Since containers are Linux-based, paths for the file storage will be case-sensitive.
Users must volume map the new storage location with the physical file path to ensure it is persistent.
[PhysicalFilePath]:[FileStorageLocation]
Refer to the above example YAML file for volume mapping.


Licensing

The following variables are used to License the Decisions environment. Without a License, users cannot log into the containerized environment. For more information, refer to Decisions License.

Environment VariableDescriptionExample Value
DECISIONS_LICENSECOMPANYIDEnter the license ID for the Container's instance.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
DECISIONS_LICENSECOMPANYNAMEEnter the company name attached to the license's ID.Decisions
DECISIONS_LICENSECONTACTEMAILEnter a contact email for the provided license.example@email.com
DECISIONS_ENVIRONMENTNAMEEnter the name of the Container to license. This can be specified during container creation or afterward.TestingEnvironment
DECISIONS_LICENSETYPEEnter the license type of the Container.
This will likely be either 'Enterprise Production' or 'EnterpriseNonProduction'.
EnterpriseProduction


Clustering

The following optional environment variables are required to set up a clustered environment.

Environment VariableDescriptionExample Value
DECISIONS_CLUSTERING_TURNONCLUSTERINGToggles whether the containers support clustering.true
DECISIONS_CLUSTERING_REDISBASEURLPrompts for the Redis URL of the Redis server.localhost:6379
DECISIONS_CAN_BE_JOB_SERVERToggles whether the server can be a job server. Ensure to mark it True when running the servers in clustering. For more information, refer to Setting the Primary Job Server for a Cluster.true


Integration

The following optional variables allow users to configure Integration settings within the Portal.

For more information, refer to Integration Settings and How to Set Up and Use JWT.

Environment VariableDescriptionExample Value
DECISIONS_INTEGRATION_
USEASYMMETRICKEY
Enables the Container to use the Public Key for JSON Web Token (JWT).
true
DECISIONS_INTEGRATION_JWTSECRETKEYEnter the Secret Key for the JSON Web Token (JWT)--
DECISIONS_INTEGRATION_JWTPUBLICKEYEnter the Public Key for the JSON Web Token (JWT)--


Azure Logging

The following environment variables can be used to configure the Azure Log Analytics.

Environment VariableDescriptionExample Value
DECISIONS_LOG_AZURE_WORKSPACE_IDRequired for log analytics. Enter the Workspace ID of the Log Analytics workspace.--
DECISIONS_LOG_AZURE_AUTHENTICATION_IDRequired for log analytics. Enter the Authentication ID of the Log Analytics workspace.--


AWS Logging and IAM credentials

The following optional environment variables are recommended for Setting up AWS Cloudwatch Logging.

Environment VariableDescriptionExample Value
DECISIONS_LOG_AWS_REGIONEnter the address of the Cloudwatch region.--
DECISIONS_LOG_AWS_LOG_GROUP_PATHEnter the log path.--
AWS_ACCESS_KEY_IDEnter the Access Key ID for the IAM Role.--
AWS_SECRET_ACCESS_KEYEnter the Secret Access Key for the IAM Role.--

Settings.xml and their corresponding Environment Variable

In Settings.xml, we modify the values between the tags to adjust the server settings. However, to configure the same settings in containers, we need to follow a naming convention: DECISIONS_<SettingName>=<Value of the setting>.

Setting from Settings.xmlEnvironment VariableDescriptionDefault Value
HideSystemValidationWarningDECISIONS_HIDESYSTEMVALIDATIONWARNINGControls whether warnings from system validation are hidden.false
DynamicLocalModuleLoadingDECISIONS_DYNAMICLOCALMODULELOADINGToggles loading local module libraries and their functions into memory.true
MaxWritableSizeInBytesDECISIONS_MAXWRITABLESIZEINBYTES Specifies the maximum size, in bytes, for writable operations. 'MaxWritableSizeInBytes' is set to -1, which suggests that there is no maximum size imposed on writable operations-1
NoLockReadsDECISIONS_NOLOCKREADToggles No Lock allows SQL to read data without regard to locks and other blockers.false
OptimizeDataMemberAccessDECISIONS_OPTIMIZEMEMBERACCESSControls optimization of data member access.false
NumberOfExclusiveApiThreadsDECISIONS_NUMBEROFEXCLUSIVEAPITHREADS
Number of exclusive API threads.
1
HideCreatedByOnImportDECISIONS_HIDECREATEDBYONIMPORTDetermines whether to hide the 'created by' information on import.true
MaintenanceModeDECISIONS_MAINTENANCEMODEToggles setting the server into Maintenance Mode. Any jobs will pause, and only Administrators can log in until this is turned off. For more information refer to Maintenance Mode.false
DefaultExpireDaysDECISIONS_DEFAULTEXPIREDAYS
7
ShareAccountSessionsDECISIONS_SHAREACCOUNTSESSIONS
false
ShowUnhandledExceptionDialogDECISIONS_SHOWUNHANDLEDEXCEPTIONDIALOGToggles display an error window when catching an unhandled exception.false
ClientStorageQuotaDECISIONS_CLIENTSTORAGEQUOTASpecifies the client storage quota, limiting the amount of data stored on the client side.1
UserIdCaseSensitiveDECISIONS_USERIDCASESENSITIVEToggles case sensitivity for username during login.false
LogFileMaxSizeDECISIONS_LOGFILEMAXSIZEPrompts for the maximum size of a log file. A log that exceeds this size then rolls over into a new file.10485760
LogMaxBackupsDECISIONS_LOGMAXBACKUPSPrompts for the maximum number of log files to keep.10
UseTimeZoneTranslationDECISIONS_USETIMEZONETRANSLATIONToggles time zone translationfalse
EnvironmentNameDECISIONS_ENVIRONMENTNAMEPrompts for the environment name of the installed instance. This will often match the license.Production
LogSqlStatements
TakingMoreThanSeconds
DECISIONS_LOGSQLSTATEMENTSTAKINGMORETHANSECONDSConfigures the system to log SQL statements that take more than a specified execution time. 5
OutputSQLProfileLogDECISIONS_OUTPUTSQLPROFILELOGThis variable activates the output of SQL profile logs. SQL profiling provides detailed insights into the execution of SQL queriesfalse
LogAPICallsTaking
MoreThanSeconds
DECISIONS_LOGAPICALLSTAKINGMORETHANSECONDSLogs API calls that take more than a specified time to complete5
LogFlowStepsTaking
MoreThanMilliseconds
DECISIONS_LOGFLOWSTEPSTAKINGMORETHANMILLISECONDSLogs Flow steps that take more than a specified time (in milliseconds) to execute1000
IgnoreAllCertificateErrorsDECISIONS_IGNOREALLCERTIFICATEERRORSToggles respecting certificate errors such as trust errors from self-signed licenses.false
LaunchDebugger
OnUnitTestFail
DECISIONS_LAUNCHDEBUGGERONUNITTESTFAILToggles initializing the Debugger upon unit test failurefalse
DatabaseConnectStringDECISIONS_DATABASECONNECTSTRINGConfigures the Container's connection to its database. A few example connection string has been listed at the end of the table.
InstanceDatabase
ConnectionStringTemplate
DECISIONS_INSTANCEDATABASECONNECTIONSTRINGTEMPLATEProvides a template for instance-specific database connection strings. This allows for dynamic configuration of database connections based on specific instances or deployments of the Decisions platform.--
DefaultDatabaseQueryTimeoutDECISIONS_DEFAULTDATABASEQUERYTIMEOUTPrompts for a time duration for database queries that, if exceeded, will automatically fail.60
Secondary
DatabaseConnectString
DECISIONS_SECONDARYDATABASECONNECTSTRINGSpecifies the connection string for the secondary database. In environments with multiple databases, this variable enables the configuration of a secondary database for specific purposes, such as redundancy or failover.
DataBaseTypeDECISIONS_DATABASETYPEConfigures what type of database the Container uses. For more information, refer to Database Server and Configuration.MSSQL/
POSTGRES/
AZURE
WatcherSocketPortDECISIONS_WATCHERSOCKETPORTSets the port for the watcher socket. The watcher socket facilitates communication and coordination between different components of the Decisions system, and configuring the port allows for proper network communication.20999
PortalBaseUrlDECISIONS_PORTALBASEURLConfigures the URL of the Container consisting of the domain name and its port.--
ClusterAddressableIPDECISIONS_CLUSTERADDRESSABLEIPPrompts for IP addresses to allow cluster server connections. If blank, then the server is not clustered.--
ClusterPortalBaseUrlDECISIONS_CLUSTERPORTALBASEURLPrompts for the Portal base URL of the clustered environment. This should match the Instance URL generated from the Control instance's Add Instance window.
If blank, then the server is not clustered. For more information, refer to Setting Up A Cluster.
--
ServerAdministratorEmailDECISIONS_SERVERADMINISTRATOREMAILPrompts for which email will be contacted by actions such as Send Logs to Support and Send Notification to Server Admin.support@
decisions.com
ServerTypeDECISIONS_SERVERTYPEDetermines the Container's server type.
Without this variable, containers are installed as a standard Application server.
ControlInstanceURLDECISIONS_CONTROLINSTANCEURLPrompts for the control instance URL in multi-tenancy environments.https://decisions-control-instance/
InstanceAuthenticationKeyDECISIONS_INSTANCEAUTHENTICATIONKEYPrompts for the instance Authorization Key.--
DeploymentLockEnabledDECISIONS_DEPLOYMENTLOCKENABLEDToggles block users from creating or modifying any Designer Elements in the server.false
ByPassSmtpServerDECISIONS_MAIL_BYPASSSMTPSERVERToggles bypassing below SMTP settings instead of using direct mail. It is not recommended to set it to True unless for testing purposes.
Refer to the Email and SMTP in Decisions article for further information.
true
ServerAddressDECISIONS_MAIL_SMTPSERVER_SERVERADDRESSEnter the domain name of the SMTP service.--
PortDECISIONS_MAIL_SMTPSERVER_PORTEnter the port number of the SMTP server.25
RequiresAuthenticationDECISIONS_MAIL_SMTPSERVER_REQUIRESAUTHENTICATIONToggles if authentication is necessary to log in to the SMTP server.false
Username DECISIONS_MAIL_SMTPSERVER_USERNAMEEnter the username of the SMTP server.--
PasswordDECISIONS_MAIL_SMTPSERVER_PASSWORDEnter the password for the specified user.--
UseSSLDECISIONS_MAIL_SMTPSERVER_USESSLToggles secure socket layer (SSL) encryption on SMTP mail.false
UseImplicitSSLDECISIONS_MAIL_SMTPSERVER_USEIMPLICITSSL
--
SkipCertificateRevocationCheckDECISIONS_MAIL_SMTPSERVER_SKIPCERTIFICATEREVOCATIONCHECK
false
PushModeDECISIONS_PUSHMODE
Enabled
ServerNameDECISIONS_SERVERNAMESpecifies the name of the Decisions server. This information is crucial for identification and management purposes in networked or distributed environments.--
SplitInstancesToProcessesDECISIONS_SPLITINSTANCESTOPROCESSES
true
RestartStoppedInstancesDECISIONS_RESTARTSTOPPEDINSTANCESIf set to true, enables the automatic restart of stopped instances. Automatic restart helps maintain continuous availability and responsiveness.true
ServerHeart
BeatIntervalInSeconds
DECISIONS_SERVERHEARTBEATINTERVALINSECONDSConfiguring this interval influences the frequency of these health-check signals.5
SendWakeUpUsingOneWayCallDECISIONS_SENDWAKEUPUSINGONEWAYCALL
false
UseLuceneFullTextSearchDECISIONS_USELUCENEFULLTEXTSEARCHIf set to true, enables the use of Lucene for full-text search capabilities. Lucene is a powerful search engine library, and activating this variable enhances the platform's ability to perform efficient full-text searches.false
SplashScreenTextDECISIONS_SPLASHSCREENTEXTPrompts for text to display when the Portal loads/reloads.Decisions OS is Loading. . .
ProductTitleDECISIONS_PRODUCTTITLESets the title or name associated with the product--
FileStorageLocationDECISIONS_FILESTORAGELOCATIONConfigures location to allow containers to preserve data.
Since containers are Linux-based, paths for the file storage will be case-sensitive.
Users must volume map the default value with the physical file storage location to ensure it is persistent.
/opt/decisions/data
LogCheckFieldTypesDECISIONS_LOGCHECKFIELDTYPESIf set to true, activates the logging of field types during checks.false
EnableSingleSignOnDECISIONS_ENABLESINGLESIGNONToggles enable single-sign-on (SSO) for user logins for added security to the Container.false
AsyncCheckPeriodDECISIONS_ASYNCCHECKPERIOD
2000
AsyncNumChecksDECISIONS_ASYNNUMCHECKS
7
AutoStartProfilerDECISIONS_AUTOSTARTPROFILERToggles automatically start the Profiler to capture the session.true
Recoverable
PasswordEncryptionType
DECISIONS_RECOVERABLEPASSWORDENCRYPTIONTYPESets the encryption type for recoverable passwords, such as DES.DES
PasswordHashEncryptionTypeDECISIONS_PASSWORDHASHENCRYPTIONTYPESpecifies the encryption algorithm used for hashing passwords within the Decisions system.SHA256
AllowedIPAddressesDECISIONS_ALLOWEDIPADDRESSESPermitted client IP addresses to access the server.
DeniedIPAddressesDECISIONS_DENIEDIPADDRESSESIP addresses to block access to the Decisions server.
InstanceNameDECISIONS_INSTANCENAMEDefines the name of the installed server instance referenced in the connection string, e.g., "localhost:80/Primary/"Primary
LoginPageAllowedIPsDECISIONS_LOGINPAGEALLOWEDIPSPermitted IP addresses for users to log in to the server.
ORMSaveByMergeDECISIONS_ORMSAVEBYMERGEFlags whether the Object-Relational Mapping (ORM) system should save data by merging changes.true
SkipEnforceDBExistsStepDECISIONS_SKIPENFORCEDBEXISTSSTEPWhen set to true, this variable instructs the server to skip enforcing the existence of the database during certain steps. This can be useful in scenarios where the database structure is managed externally or dynamically.false
UsePrototypeInstanceDECISIONS_USEPROTOTYPEINSTANCEToggles using a template instance. Mainly used for multitenant environments.true
FullTextSearchDECISIONS_FULLTEXTSEARCHDefines the status of full-text search within the platform, specifying whether it is enabled or disabled. Full-text search enhances the search capabilities, allowing for more comprehensive and efficient searching of textual data.Enabled
HideDetailedErrorMessagesDECISIONS_HIDEDETAILEDERRORMESSAGESControls whether detailed error messages are hidden.false
InterServer
CommunicationMode
DECISIONS_INTERSERVERCOMMUNICATIONMODE Specifies the mode of communication between servers, such as using HTTP. This variable influences the underlying communication protocols employed for inter-server interactions.http
CaptureAspNetLogsDECISIONS_CAPTUREASPNETLOGSToggles capturing HTTP requests and responses in a log file saved under /Logs/Asp.NET Core with the prefix "w3clog."false
AspNetLogsFileCountLimitDECISIONS_ASPNETLOGSFILECOUNTLIMITAllows to configure the maximum number of ASP NET logs to store. Newer logs will override the oldest logs30
AspNetLogsFileSizeLimitDECISIONS_ASPNETLOGSFILESIZELIMITAllows to configure the maximum size of an ASP NET log file. A log that exceeds this size then rolls over into a new file.104857600
CaptureW3CLogsDECISIONS_CAPTUREW3CLOGSToggles capturing W3C logs in the log filefalse
ServiceAccountPasswordDECISIONS_SERVICEACCOUNTPASSWORD

DefaultSameSiteCookieModeDECISIONS_DEFAULTSAMESITECOOKIEMODEAllows selection of the cookie behavior for the server. SameSite attributes control how cookies are sent with cross-site requests, impacting security and privacy aspects.Lax
ForceBaseURIDECISIONS_FORCEBASEURIThis environment variable must be used if SSL terminates at the Load Balancer.
AllowProxyFromDECISIONS_ALLOWPROXYFROMToggles permitting proxy headersfalse
HttpPortDECISIONS_HTTPPORTThese variables allow the application to run on designated ports within the containers. By doing so, users can map the Container's port to a particular port on the host machine, facilitating access to the application running inside the Container from the host's network.80
HttpsPortDECISIONS_HTTPSPORT443
ProxyFromWhiteListDECISIONS_PROXYFROMWHITELISTThis setting is a comma-separated list of "protocol://host" values that make up a whitelist. The whitelist defines the addresses (protocols and hosts) the platform allows proxying. If this list is empty and AllowProxyFrom is set to true, it allows proxying from any source.
CustomHeadersDECISIONS_CUSTOMHEADERSFor Custom Headers, users need to set the value of the DECISIONS_CUSTOMHEADERS in a JSON String format. This JSON String gets automatically deserialized and converted in XML format in Settings.xml.
Example: [{"Name": "X-Frame-Options", "Value": "SAMEORIGIN"}]
[{"Name": "X-Frame-Options", "Value": "SAMEORIGIN"}]
ApplicationNameDECISIONS_APPLICATIONNAMEPrompts for a name that any created cookies can use.
Decisions
DisableAutoSSO
SignInParameter
DECISIONS_DISABLEAUTOSSOSIGNINPARAMETERWhen set to true, this variable disables the automatic inclusion of Single Sign-On (SSO) parameters during sign-in. This can be relevant for scenarios where custom handling of SSO parameters is required.false
HttpsCerificateLocationDECISIONS_HTTPSCERIFICATELOCATIONSpecifies the location of the HTTPS certificate used for securing communications over HTTPSPhysicalFilePath
CertificateThumbPrintDECISIONS_CERTIFICATETHUMBPRINTPrompts for certificate thumbprint of SSL certificate when using the certificate store option.
InstanceAuthenticationKeyDECISIONS_INSTANCEAUTHENTICATIONKEYPrompts for the authentication key are generated from a Control instance's Add Instance window.
ObfuscateSessionIdInLogsDECISIONS_OBFUSCATESESSIONIDINLOGSWhen set to true, this variable instructs the system to obfuscate session IDs in logs.false
AllowedFileAccessPathsDECISIONS_ALLOWEDFILEACCESSPATHSAllows to specify File Paths to which the Decisions Server can write files. The primary purpose of this setting is to prevent File Path Traversal.
This setting should be used if users get an error "{FilePath} is outside the allowed directory paths.

EnableHttpDECISIONS_ENABLEHTTPThe Decisions application running inside a container listens to ports 80 and 443 by default, and these variables toggle the use of the default web traffic ports for connections to the server.
Note: Either HTTP or HTTPS must be marked True to access the application.
true
EnableHttpsDECISIONS_ENABLEHTTPSfalse
HttpsCertificatePathDECISIONS_HTTPSCERTIFICATEPATHEnter the file path where the Container's certificate resides. This searches C:\Docker by default. Enter the certificate name at the end.
HttpsCertificatePasswordDECISIONS_HTTPSCERTIFICATEPASSWORDUse this variable if the SSL certificate is password protected.
EnableHttpToHttpsRedirectionDECISIONS_ENABLEHTTPTOHTTPSREDIRECTIONThis setting will redirect the connection from HTTP to HTTPS.false



Was this article helpful?