> ## Documentation Index
> Fetch the complete documentation index at: https://ikun.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 工作空间设置

`workspace/settings.py` 文件中的 `WorkspaceSettings` 对象定义了您的应用和资源使用的通用设置。以下是建议您更新的设置：

```python workspace/settings.py theme={null}
ws_settings = WorkspaceSettings(
    # 更新为您的项目名称
    ws_name="ai",
    # 添加您的 AWS 子网
    subnet_ids=["subnet-xyz", "subnet-xyz"],
    # 添加您的镜像仓库
    image_repo="[ACCOUNT_ID].dkr.ecr.us-east-1.amazonaws.com",
    # 设置为 True 可在本地构建镜像
    build_images=True,
    # 设置为 True 可在构建后推送镜像
    push_images=True,
)
```

<Note>
  `WorkspaceSettings` 也可以通过环境变量或 `.env` 文件进行更新。

  请查看 `example.env` 文件获取示例。
</Note>

### 工作空间名称

`ws_name` 用于命名您的应用和资源。可以将其更改为您的项目或团队名称，例如：

* `ws_name="booking-ai"`
* `ws_name="reddit-ai"`
* `ws_name="vantage-ai"`

`ws_name` 用于命名：

* 您应用的镜像
* 数据库、streamlit 应用和 FastAPI 服务器等应用
* 存储桶、密钥和负载均衡器等资源

请查看 `workspace/dev_resources.py` 和 `workspace/prd_resources.py` 文件了解其用法。

## 镜像仓库

`image_repo` 定义了您镜像的仓库。

* 如果使用 dockerhub，则类似于 `agno`。
* 如果使用 ECR，则类似于 `[ACCOUNT_ID].dkr.ecr.us-east-1.amazonaws.com`

请查看 `workspace/dev_resources.py` 中的 `dev_image` 和 `workspace/prd_resources.py` 中的 `prd_image` 了解其用法。

## 构建镜像

将 `build_images` 设置为 `True` 会在运行 `ag ws up dev:docker` 或 `ag ws up prd:docker` 时在本地构建镜像。

请查看 `workspace/dev_resources.py` 中的 `dev_image` 和 `workspace/prd_resources.py` 中的 `prd_image` 了解其用法。

了解更多关于：

* [构建您的开发镜像](/workspaces/workspace-management/development-app#build-your-development-image)
* [构建您的生产镜像](/workspaces/workspace-management/production-app#build-your-production-image)

## 推送镜像

将 `push_images` 设置为 `True` 会在运行 `ag ws up dev:docker` 或 `ag ws up prd:docker` 时在构建后推送镜像。

请查看 `workspace/dev_resources.py` 中的 `dev_image` 和 `workspace/prd_resources.py` 中的 `prd_image` 了解其用法。

了解更多关于：

* [构建您的开发镜像](/workspaces/workspace-management/development-app#build-your-development-image)
* [构建您的生产镜像](/workspaces/workspace-management/production-app#build-your-production-image)

## AWS 设置

`aws_region` 和 `subnet_ids` 提供了用于创建生产资源的数值。请查看 `workspace/prd_resources.py` 文件了解其用法。
