diff --git a/docs/3.10/configurations.md b/docs/3.10/configurations.md index baa655d7..571c0c7c 100644 --- a/docs/3.10/configurations.md +++ b/docs/3.10/configurations.md @@ -167,6 +167,19 @@ The following are additional configurations available for ScalarDB: | `scalar.db.active_transaction_management.expiration_time_millis` | ScalarDB maintains ongoing transactions, which can be resumed by using a transaction ID. This setting specifies the expiration time of this transaction management feature in milliseconds. | `-1` (no expiration) | | `scalar.db.default_namespace_name` | The given namespace name will be used by operations that do not already specify a namespace. | | +## Placeholder usage + +You can use placeholders in the values, and they are replaced with environment variables (`${env:}`) or system properties (`${sys:}`). You can also specify default values in placeholders like `${sys::-}`. + +The following is an example of a configuration that uses placeholders: + +```properties +scalar.db.username=${env::-admin} +scalar.db.password=${env:} +``` + +In this example configuration, ScalarDB reads the username and password from environment variables. If the environment variable `SCALAR_DB_USERNAME` does not exist, ScalarDB uses the default value `admin`. + ## Configuration examples This section provides some configuration examples. diff --git a/docs/3.11/configurations.md b/docs/3.11/configurations.md index 832578c3..9f137390 100644 --- a/docs/3.11/configurations.md +++ b/docs/3.11/configurations.md @@ -188,6 +188,19 @@ The following are additional configurations available for ScalarDB: | `scalar.db.active_transaction_management.expiration_time_millis` | ScalarDB maintains ongoing transactions, which can be resumed by using a transaction ID. This setting specifies the expiration time of this transaction management feature in milliseconds. | `-1` (no expiration) | | `scalar.db.default_namespace_name` | The given namespace name will be used by operations that do not already specify a namespace. | | +## Placeholder usage + +You can use placeholders in the values, and they are replaced with environment variables (`${env:}`) or system properties (`${sys:}`). You can also specify default values in placeholders like `${sys::-}`. + +The following is an example of a configuration that uses placeholders: + +```properties +scalar.db.username=${env::-admin} +scalar.db.password=${env:} +``` + +In this example configuration, ScalarDB reads the username and password from environment variables. If the environment variable `SCALAR_DB_USERNAME` does not exist, ScalarDB uses the default value `admin`. + ## Configuration examples This section provides some configuration examples. diff --git a/docs/3.8/configurations.md b/docs/3.8/configurations.md index ab82a37b..2e8966ef 100644 --- a/docs/3.8/configurations.md +++ b/docs/3.8/configurations.md @@ -180,6 +180,19 @@ The following are additional configurations available for ScalarDB: | `scalar.db.metadata.cache_expiration_time_secs` | ScalarDB has a metadata cache to reduce the number of requests to the database. This setting specifies the expiration time of the cache in seconds. | `-1` (no expiration) | | `scalar.db.active_transaction_management.expiration_time_millis` | ScalarDB maintains ongoing transactions, which can be resumed by using a transaction ID. This setting specifies the expiration time of this transaction management feature in milliseconds. | `-1` (no expiration) | +## Placeholder usage + +You can use placeholders in the values, and they are replaced with environment variables (`${env:}`) or system properties (`${sys:}`). You can also specify default values in placeholders like `${sys::-}`. + +The following is an example of a configuration that uses placeholders: + +```properties +scalar.db.username=${env::-admin} +scalar.db.password=${env:} +``` + +In this example configuration, ScalarDB reads the username and password from environment variables. If the environment variable `SCALAR_DB_USERNAME` does not exist, ScalarDB uses the default value `admin`. + ## Configuration examples This section provides some configuration examples. diff --git a/docs/3.9/configurations.md b/docs/3.9/configurations.md index 0b4074ac..571b985f 100644 --- a/docs/3.9/configurations.md +++ b/docs/3.9/configurations.md @@ -167,6 +167,19 @@ The following are additional configurations available for ScalarDB: | `scalar.db.active_transaction_management.expiration_time_millis` | ScalarDB maintains ongoing transactions, which can be resumed by using a transaction ID. This setting specifies the expiration time of this transaction management feature in milliseconds. | `-1` (no expiration) | | `scalar.db.default_namespace_name` | The given namespace name will be used by operations that do not already specify a namespace. | | +## Placeholder usage + +You can use placeholders in the values, and they are replaced with environment variables (`${env:}`) or system properties (`${sys:}`). You can also specify default values in placeholders like `${sys::-}`. + +The following is an example of a configuration that uses placeholders: + +```properties +scalar.db.username=${env::-admin} +scalar.db.password=${env:} +``` + +In this example configuration, ScalarDB reads the username and password from environment variables. If the environment variable `SCALAR_DB_USERNAME` does not exist, ScalarDB uses the default value `admin`. + ## Configuration examples This section provides some configuration examples. diff --git a/docs/latest/configurations.md b/docs/latest/configurations.md index 832578c3..9f137390 100644 --- a/docs/latest/configurations.md +++ b/docs/latest/configurations.md @@ -188,6 +188,19 @@ The following are additional configurations available for ScalarDB: | `scalar.db.active_transaction_management.expiration_time_millis` | ScalarDB maintains ongoing transactions, which can be resumed by using a transaction ID. This setting specifies the expiration time of this transaction management feature in milliseconds. | `-1` (no expiration) | | `scalar.db.default_namespace_name` | The given namespace name will be used by operations that do not already specify a namespace. | | +## Placeholder usage + +You can use placeholders in the values, and they are replaced with environment variables (`${env:}`) or system properties (`${sys:}`). You can also specify default values in placeholders like `${sys::-}`. + +The following is an example of a configuration that uses placeholders: + +```properties +scalar.db.username=${env::-admin} +scalar.db.password=${env:} +``` + +In this example configuration, ScalarDB reads the username and password from environment variables. If the environment variable `SCALAR_DB_USERNAME` does not exist, ScalarDB uses the default value `admin`. + ## Configuration examples This section provides some configuration examples.