update related docs

This commit is contained in:
cal-weng 2025-10-30 17:32:13 +08:00
parent 306c7a2480
commit e1e4528db6
10 changed files with 108 additions and 60 deletions

View file

@ -296,6 +296,10 @@ const side = {
text: "Customize app domains",
link: "/manual/olares/settings/custom-app-domain",
},
{
text: "Manage app variables",
link: "/manual/olares/settings/manage-app-env",
},
],
},
{

View file

@ -294,6 +294,10 @@ const side = {
"text": "自定义应用域名",
"link": "/zh/manual/olares/settings/custom-app-domain",
},
{
text: "管理应用环境变量",
link: "/zh/manual/olares/settings/manage-app-env",
},
],
},
{

View file

@ -111,6 +111,17 @@ To install a custom application:
You can view all installed custom applications under the **My Olares** > **Upload** tab.
### Setting environment variables
During app installation, if an environment variable is required for the app but it either has no default value or its referenced system variable is unset, Market will display a settings pop-up:
![Set environment variables](/images/manual/olares/set-app-env-var.png#bordered)
* **Custom variables**: Enter the value directly in the installation pop-up.
* **Referenced system variables**: You must first go to the **Settings > Developer > System Environment Variables** page to set the value for the corresponding variable.
After completing the environment variable setup, you can continue the installation.
## Update applications
To update an application from Market:

View file

@ -65,42 +65,24 @@ Once downloaded, you can attach the log file to a GitHub feedback post and share
## Set system environment variables
System environment variables, prefixed with `OLARES_SYSTEM_`, let you centrally manage important Olares configurations such as SMTP and API keys, making setup and maintenance simpler.
Starting from Olares version 1.12.2, Olares supports system environment variables declared by applications. This allows users to configure common settings for applications at the system level, eliminating the need to modify each application individually. Typical categories are:
You can view and adjust these variables at any time to optimize network access and improve overall system performance.
- User information, for example, `OLARES_USER_USERNAME`.
- SMTP services, for example, `OLARES_USER_SMTP_PORT`.
- Image/proxy settings, for example, `OLARES_SYSTEM_CDN_SERVICE`.
- Third-party service API-KEYs, for example, `OLARES_USER_CUSTOM_OPENAI_APIKEY`, and `OLARES_USER_HUGGINGFACE_TOKEN`.
:::tip Note
- You cannot add or delete system environment variables, nor can you modify their attributes.
- When installing and activating Olares, the system automatically sets some environment variables based on your Olares ID to ensure optimal performance and connectivity.
:::
- System environment variables are predefined. You can edit their values, but you **cannot** add or delete variables or change their types.
To manually adjust system environment variables, follow these steps:
- If a variable is marked as `required: true` and has no value, the system will prompt you to configure it before installing any application that depends on it.
:::
![Set Sys Env Var](/images/manual/olares/sys-env-var.png#bordered)
### Automatic configuration
1. From the Olares desktop, navigate to **Settings > Developer > System Environment Variables**.
2. Find the variable you want to modify in the list.
3. Click the <i class="material-symbols-outlined">edit_square</i> icon and enter the variable's value in the pop-up dialog. Variables that are grayed out cannot be modified.
4. Click **Confirm** to save your changes.
When you activate Olares, the system automatically configures certain environment variables based on your Olares ID. This helps Olares connect to the network region closest to you for faster downloads and smoother performance.
- If your Olares ID ends with `.cn` (for example, `user@olares.cn`), the variables will use `.cn` service URLs.
- If your Olares ID ends with `.com` (for example, `user@olares.com`), the variables will use `.com` service URLs.
Olares automatically sets the following variables to ensure optimal network access:
- `OLARES_SYSTEM_REMOTE_SERVICE` Handles component interface calls.
- `OLARES_SYSTEM_CDN_SERVICE` Manages downloads and content delivery.
These variables take effect automatically after activation, ensuring Olares always uses the fastest and most suitable network connections.
### Modify variables
To manually change system environment variables:
1. Navigate to **Settings** > **Developer** > **System Environment Variables**.
2. Locate the variable you want to modify.
3. Click the <i class="material-symbols-outlined">edit_square</i> icon to change its value. You cannot edit grayed-out variables.
4. Enter the new value and click **Confirm** to apply the changes.
![Set Sys Env Var](/images/manual/olares/sys-env-var.png#bordered)

View file

@ -0,0 +1,28 @@
---
outline: [2, 3]
description: Learn how to manage application environment variables in Olares
---
# Manage application environment variables
Application environment variables are key parameters used to configure the runtime behavior and settings of an application container. They determine how the application runs, which services it connects to, and what user credentials it uses.
To view or modify an application's environment variables:
1. Navigate to **Settings** > **Application**,
2. Select the target application.
3. Enter the **Manage environment variables** page.
![Application environment variables](/images/manual/olares/manage-app-env.png#bordered)
## Application environment variable types
| Environment Variable Type | Description | Edit Permissions |
|:----------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------|
| **Referenced system environment variables** | References system environment <br/>variables (e.g., **`OLARES_USER_USERNAME`**).<br/> When an application is declared to use <br/>system variables, you will see them here. | **Read-only**. You must navigate to **Settings > Developer > System Environment Variables** page to make modifications. |
| **Application-specific variables** | Configuration variables that are specific to<br/> the application itself. | **Editable**. You can modify their values directly on this page without needing to edit YAML files in Control Hub. |
## Learn more
[System environment variables](developer.md#set-system-environment-variables)

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

View file

@ -101,6 +101,17 @@ Olares **应用市场**提供多种方式发现和浏览应用:
你可以在**上传**页签查看并管理所有本地自定义应用。
### 环境变量设置
在应用安装过程中,如果某个环境变量是应用运行必需的,且该变量无默认值或引用的系统变量尚未设置,应用市场会弹出设置提醒窗口:
![设置环境变量](/images/manual/olares/set-app-env-var.png#bordered)
* **自定义变量**:您可以直接在安装弹窗中输入值。
* **引用的系统变量**:您需要先前往 **设置 > 开发者 > 系统环境变量** 页面设置相应变量值。
完成设置后可点击继续安装。
## 更新应用
从应用市场下载的应用可按以下步骤获取更新:

View file

@ -61,40 +61,25 @@ description: 了解如何利用开发者页面管理仓库、查看系统镜像
## 设置系统环境变量
系统环境变量以`OLARES_SYSTEM_`开头,用于**集中管理** Olares 的核心功能配置,例如 SMTP、API Key 等通用设置。
从 Olares 1.12.2 版本开始Olares 支持应用程序声明使用系统环境变量。这允许用户为应用配置通用设置,而无需单独修改每个应用。典型系统环境变量类别包括:
你可以在此页面查看和修改这些变量,以优化网络访问和系统性能。
- 用户信息,例如 `OLARES_USER_USERNAME`
- SMTP 服务,例如 `OLARES_USER_SMTP_PORT`
- 镜像/代理设置,例如 `OLARES_SYSTEM_CDN_SERVICE`
- 第三方服务 API-KEY例如 `OLARES_USER_CUSTOM_OPENAI_APIKEY``OLARES_USER_HUGGINGFACE_TOKEN`
:::tip 说明
- 系统环境变量不支持新增或删除,也无法修改其属性。
- 安装和激活 Olares 时,系统会根据您的 Olares ID 自动设置部分环境变量,以确保最优的性能和连接体验。
:::
- 你无法在此处新增或删除系统环境变量,也无法修改它们的类型或其他属性。
要手动调整系统环境变量,请按以下步骤操作:
- 如果某个环境变量的属性为`required: true`且尚未设置值,系统会在安装依赖该变量的应用时,提示你先完成配置。
:::
1. 从 Olares 桌面进入**设置 > 开发者 > 系统环境变量**。
### 自动配置
2. 在列表中找到你要修改的变量。
激活 Olares 时,系统会根据你的 Olares ID 自动设置部分环境变量,以确保连接到最适合的网络区域,从而提高下载与访问速度
3. 点击<i class="material-symbols-outlined">edit_square</i>图标,在弹出对话框中输入变量值。置灰的变量不可修改
- 如果 Olares ID 以`.cn`结尾(如`user@olares.cn`),系统会将环境变量值设置为使用`.cn`的服务地址。
- 如果 Olares ID 以`.com`结尾(如`user@olares.com`),系统会将环境变量值设置为使用`.com`的服务地址。
系统会自动设置以下环境变量:
- `OLARES_SYSTEM_REMOTE_SERVICE`:用于调用组件接口。
- `OLARES_SYSTEM_CDN_SERVICE`:用于下载和内容分发。
这些变量会在系统激活时自动生效,确保 Olares 使用最快、最合适的网络服务。
### 修改变量
如果你需要手动调整系统环境变量,请按以下步骤操作:
1. 从 Olares 桌面进入**设置 > 开发者 > 系统环境变量**。
2. 在列表中找到你要修改的变量。
3. 点击<i class="material-symbols-outlined">edit_square</i>图标。置灰的变量不可修改。
4. 输入新值后,点击**确认**保存更改。
4. 点击**确认**保存更改。
![设置系统环境变量](/images/zh/manual/olares/sys-env-var-cn.png#bordered)

View file

@ -0,0 +1,23 @@
---
outline: [2, 3]
description: 了解如何在 Olares 中管理应用环境变量
---
# 管理应用环境变量
应用环境变量是为应用容器配置运行时行为和设置的关键参数,决定了应用程序如何运行、连接到哪些服务,以及使用哪些用户凭证等。
你可以在**设置** > **应用** 下选取具体应用,并进入**管理环境变量**页面查看或修改环境变量。
![应用环境变量](/images/manual/olares/manage-app-env.png#bordered)
## 应用环境变量类型
| 环境变量类型 | 说明 | 操作权限 |
|:--------------|:---------------------------------------------------------------------|:------------------------------------------|
| **引用的系统环境变量** | 引用自系统级别的全局环境变量(如<br/> **`OLARES_USER_USERNAME`**)。当应用声明<br/>使用系统变量时,你将在此处看到它们。 | **只读**。你必须前往 **设置 > 开发者 > 系统环境变量**页面进行修改。 |
| **应用私有环境变量** | 应用自身的配置变量。 | **可编辑**。用户可以直接在此处修改,无需通过控制面板编辑 YAML 文件。 |
## 了解更多
- [系统环境变量](developer.md#设置系统环境变量)