HCL Commerce Version 9.1.13.0 or later

Starting the Nextjs (Ruby) store Docker container by retrieving parameters from Vault

Learn about how to start the Nextjs (Ruby) store Docker container by specifying CONFIGURE_MODE=Vault.

Mandatory environment variables

These are the mandatory environment variables that you must specify to configure the Nextjs (Ruby) store Docker container to retrieve additional parameters from Vault.

Environment variable name Description Comments
TENANT The name of the group that contains your set of environments. For example, MyCompany. Container environment variable. This can be specified in the values.yaml configuration file under common.tenant.
ENVIRONMENT The name of the environment. For example, Non-production. Container environment variable. This can be specified in the values.yaml configuration file under common.environmentName.
ENVTYPE The environment type. Accepted values are auth and live. Container environment variable. This can be specified in the values.yaml configuration file under common.environmentType.
VAULT_TOKEN The Vault token to use to connect to Vault and request certification from Vault PKI. Container environment variable. This can be specified in the values.yaml configuration file under common.vaultToken.
VAULT_URL The Vault URL to use to connect to Vault and request certification from Vault PKI. Container environment variable. This can be specified in the values.yaml configuration file under common.vaultUrl.
CONFIGURE_MODE The configure mode.
Accepted values are:
  • Vault for Vault configuration.
  • EnvVariables for environment variables configuration.
Set this value to Vault to use Vault configuration, and the configurations present within this reference.
Container environment variable. This can be specified in the values.yaml configuration file under common.configureMode.

Optional environment variables

These are the optional environment variables that you can specify to configure the Nextjs (Ruby) store Docker container.

Environment variable name Description Comments
HCL Commerce Version 9.1.14.0 or laterNODE_INSTANCE_NUMBER Defines the maximum number of concurrent Node processes that can be run by the Node.js cluster API.
Note: The value that is specified in Vault takes precedence over other configuration methods.
Container environment variable. This can be specified in the values.yaml configuration file under nextjsApp.resources.limits.cpu.
This can also be specified within Vault.
${VAULT_URL}/${TENANT}/${ENVIRONMENT}/nodeInstanceNumber/nextjs-app

Mandatory Vault configuration variables

These are the mandatory Vault key values that you must specify within Vault to configure the Nextjs (Ruby) store Docker container to use the Vault configuration mode.

Vault path Description Reference environment variable
${VAULT_URL}/${TENANT}/${ENVIRONMENT}/reactStoreMapApiKey The Google Maps API key that is used by the React store.
Note: A placeholder value can be used to enable you to start the container. For example, google-api-key.
MAP_API_KEY

Optional Vault configuration variables

These are the optional Vault key values that you can specify within Vault to configure the Nextjs (Ruby) store Docker container when used with the Vault configuration mode.

Vault path Description Reference environment variable
${VAULT_URL}/${TENANT}/${ENVIRONMENT}/domainName The internal service domain name. The default value is default.svc.cluster.local. If the deployed environment is on a special namespace on Kubernetes, then the domain name should be .svc.cluster.local. DOMAIN_NAME
${VAULT_URL}/${TENANT}/${ENVIRONMENT}/${ENVTYPE}/txHost The Transaction server host name.

The default value is ${TENANT}${ENVIRONMENT}${ENVTYPE}ts-app.${DOMAIN_NAME}.

TX_HOST
${VAULT_URL}/${TENANT}/${ENVIRONMENT}/${ENVTYPE}/queryHost The Search server hostname, which is referring to the Query service for Elasticsearch-based search solution.

The default value is ${TENANT}${ENVIRONMENT}${ENVTYPE}query-app.${DOMAIN_NAME}.

SEARCH_HOST
${VAULT_URL}/${TENANT}/${ENVIRONMENT}/logLevel/nextjs-app The log level used for troubleshooting purposes.
Available log levels are:
  • trace
  • debug
  • info
  • warn
  • error
  • fatal
Note:
  • When configured as trace, all messages are displayed.
  • When configured as debug, all messages are displayed except those tagged as trace.
  • When configured as info, all messages at levels info through fatal are displayed.
By default, server-side API client log messages are displayed at level:
  • HCL Commerce Version 9.1.14.0info
  • HCL Commerce Version 9.1.13.0trace
.
LOG_LEVEL
${VAULT_URL}/${TENANT}/${ENVIRONMENT}/traceSpecification/nextjs-app Defines which API methods are logged.
Functions can be filtered using a comma-separated list.
TRACE_DETAILS=findProducts,getV2CategoryResources
This specification will display the log messages from the findProducts and the getV2CategoryResources functions only.
By default, this value is left empty. This implies that all functions are logged.
TRACE_DETAILS= 
TRACE_DETAIL
${VAULT_URL}/${TENANT}/${ENVIRONMENT}/logSensorString/nextjs-app Defines the masking string that is used in logs to mask sensitive information, for example, messages with GDPR-related content. The set of values to mask are identified by their keys in the logging/core/redactionKeys.ts configuration file. For more information, see https://getpino.io/#/docs/redaction.

The default value given in the template is **GDPR COMPLIANT**. If the value is empty, or not set, then the censor string that is used is ****.

LOG_SENSOR_STRING
HCL Commerce Version 9.1.14.0 or later${VAULT_URL}/${TENANT}/${ENVIRONMENT}/nodeInstanceNumber/nextjs-app Defines the maximum number of concurrent Node processes that can be run by the Node.js cluster API.
Note: The value that is specified in Vault takes precedence over other configuration methods.
NODE_INSTANCE_NUMBER
Note: The additional configuration is required to update content security policy (CSP) in the store-web container. See Starting the Store Web Docker container by retrieving parameters from Vault for more information.