Skip to content

Application Configuration

By setting the parameters field in project.yaml, you can declare custom configuration items. These items will be displayed on the application settings page for configuration.

Three types of configuration items are supported:

  • String type
  • Number type
  • Password type
  • Path type

Configuration example:

yaml
parameters:
    # configuration item key
  - key: ACCOUNT
    # type: string, number, path, password
    type: string
    # is required
    required: true
    # whether it can be modified after installation
    changeable: true
    # display name and description in different languages
    i18n:
      en-US:
        # configuration item name
        name: Login Account
        # configuration item description
        description: 6-8 characters
      zh-CN:
        name: 登录账号
        description: 长度6-8位

The values of configuration items can be obtained at runtime through environment variables, where the environment variable name is the key of the configuration item. Users can modify the values of configuration items on the application settings page. After modification, the application needs to be restarted for the changes to take effect. If a configuration item does not support modification, you can set changeable to false when declaring the configuration item.