You can specify a set of environment variables specific to each application. You can use these environment variables to change settings for an application at any time after you deploy the application. Environment variables that are specified for an application cannot be applied to a different application. You can specify the same environment variable for multiple applications but the value of the environment variable is unique to each application.

Configure environment variables

  1. On the Configurations tab of the Environment Details page, view the Start Configuration field.
  2. Enter a Variable Name and Variable Value. If you want to add more environment variables, click Add.
    Notice Predefined environment variables have a higher priority than console settings. Do not repeatedly configure environment variables. This prevents console settings from being overridden.
  3. After the configuration is complete, click Change Configuration in the upper-right corner of the Configurations page to enable the configurations.

Predefined environment variables

In addition to custom environment variables, Web+ provides with you predefined environment variables. You can configure these environment variables based on your requirements. The following table lists these environment variables, sample values, and the description of each environment variable.

Variable name Example Description
WP_ENV_ID we-5d3e9e9a4cb0d77689e9**** The ID of the environment.
WP_ENV_NAME test_env The name of the environment.
WP_ENV_CREATE_USER test.user The name of the user who creates the environment.
WP_ENV_CREATE_TIME 1564384923001 The creation time for the environment.
WP_CHANGE_ID wc-5d3f096e4cb0d77689e9**** The update ID of the latest environment change.
WP_CHANGE_TRIGGER_FROM Console The source from which the latest environment change initiates.
WP_CHANGE_TRIGGER_USER test.user The user who initiates the latest environment change.
WP_CHANGE_NAME apply.env The name of the update for the latest environment change.
WP_CHANGE_CREATE_TIME 1564412270849 The start time of the latest environment change.
WP_CHANGE_REQUEST_ID 911B19AF-DB53-450D-84FB-2A2307DC**** The request ID for the latest environment change.
WP_APP_ID wa-5d3e9e994cb0d77689e9**** The ID of the application.
WP_APP_NAME test_app The application name.
WP_APP_CATEGORY PHP The technology stack type of the application.
WP_APP_CREATE_TIME 1564384921921 The creation time of the application.
WP_APP_CREATE_USER test.user The name of the user who creates the application.
WP_PKG_VERSION_ID wp-5d3e9e9a4cb0d77689e9**** The version ID of the deployment package.
WP_PKG_VERSION_LABEL 20190729.152153 The version of the deployment package.
WP_PKG_VERSION_ETAG 266FB8E532E1D924BDAFC65A261E**** The ETag value of the deployment package version. The value is produced by using the MD5 message-digest algorithm.
WP_PKG_VERSION_SOURCE resources/Php1/versions/20190729.152153/webplus-demo-php.zip The storage path of the deployment package for the version.
WP_PKG_VERSION_CREATE_TIME 1564384922317 The creation time of the deployment package version.
WP_PKG_VERSION_CREATE_USER test.user The user who creates the deployment package version.
WP_INSTANCES_ID i-2ze2u0df969vuwow**** The ID of the ECS instance.
WP_INSTANCES_PRIVATE_IP 172.17.82.37 The private IP address of the ECS instance.
WP_RDS_ENGINE MySQL The database engine for the ApsaraDB for RDS instance.
WP_RDS_CONNECTION_ADDRESS rm-2ze49r7276jbi****.mysql.rds.aliyuncs.com The internal endpoint of the ApsaraDB for RDS instance.
WP_RDS_PORT 3306 The port number of the ApsaraDB for RDS instance.
WP_RDS_ACCOUNT_NAME webplus The account name of the ApsaraDB for RDS instance.
WP_RDS_ACCOUNT_PASSWORD ***** The password of the ApsaraDB for RDS instance.
WP_RDS_DATABASE webplus The name of the ApsaraDB for RDS instance.
APP_HOME /home/admin/app/testapp The local folder of the deployment package.
TOMCAT_HOME /home/admin/tomcat8 The installation folder of Tomcat.
WP_SERVICE_PORT 8080 The service port.
Notice
  • When you log on to an ECS instance by using Secure Shell (SSH), environment variables that are specified in Web+ will not be loaded.
  • Web+ cannot automatically configure a service port for applications of the following technology stack types: Java, Go, Node.js, and Native. You can change the value of the $WP_SERVICE_PORT environment variable to configure a service port to avoid health check failures.