Supporting database connection configuration through environment variables

PowerServer 2025 R2 supports configuring and overriding database connection settings through environment variables. This enhancement greatly improves security and deployment flexibility in Docker, Kubernetes, and other containerized or cloud environments.

All fields in the connection configuration (such as UserID, Password, CommandTimeout, etc.) can be overridden at runtime via environment variables.

For example, given the following Applications.json configuration:

{
......
  "Connections": {
    "Default": {
      "sales": {
        "ConnectionType": "Odbc",
        "OdbcName": "PB Demo DB V2025R2",
        "OdbcDriver": "SqlAnywhere",
        "UserID": "dba",
        "Password": "eyJQYXlsb2FkIMlhPQT09In0=",
        "CommandTimeout": 30,
        "SecurityOptions": null,
        "OtherOptions": null,
        "DynamicConnection": false
      }
    }
  }
}

Environment variable names must follow the same hierarchical structure as the Applications.json file, using ":" as the separator.

The corresponding environment variables can therefore be defined as follows:

Connections:Default:sales:UserID

Connections:Default:sales:Password

Connections:Default:sales:CommandTimeout, etc.

For example, to change the database login user from "dba" to "user" at runtime, create the following environment variable: