# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: FastGPT
spec:
    description: A knowledge base Q&A system based on LLM with out-of-the-box data processing and model invocation capabilities.
    coverImage: https://fastgpt.io/og.png?1731578176153
    icon: https://raw.githubusercontent.com/labring/FastGPT/main/.github/imgs/logo.svg
    variables:
        - key: PUBLIC_DOMAIN
          type: DOMAIN
          name: Domain
          description: What is the domain you want for your FastGPT?
    tags:
        - AI/ML
        - Knowledge Base
        - LLM
        - RAG
    readme: |-
        # FastGPT

        FastGPT is a knowledge base Q&A system based on LLM large language models, providing out-of-the-box data processing and model invocation capabilities.

        ## Features

        - **Out-of-the-box**: Support direct document upload, automatic data preprocessing, vectorization and QA splitting
        - **Visual Workflow**: Provides easy-to-use visual workflow orchestration for more complex Q&A scenarios
        - **Unlimited Extension**: Support plugin mode for quick integration of new features
        - **Easy Debugging**: Provides reference tracking and complete conversation logs

        ## Service Components

        This template includes the following services:

        - **FastGPT**: Main application service providing Web interface and API
        - **PostgreSQL**: Vector database for storing vector data
        - **MongoDB**: Main database for storing business data
        - **Redis**: Cache database providing high-performance caching
        - **MinIO**: S3-compatible object storage for file storage
        - **Sandbox**: Code execution sandbox environment
        - **Plugin**: Plugin service supporting extended functionality
        - **MCP Server**: Model Context Protocol server
        - **AI Proxy**: AI proxy service managing model invocations

        ## Environment Variables

        After deployment, the following environment variables will be automatically configured:

        - `${FASTGPT_URL}`: FastGPT main service URL
        - `${POSTGRES_CONNECTION_STRING}`: PostgreSQL vector database connection string
        - `${MONGO_CONNECTION_STRING}`: MongoDB database connection string
        - `${REDIS_CONNECTION_STRING}`: Redis cache connection string
        - `${MINIO_ENDPOINT}`: MinIO object storage endpoint
        - `${SANDBOX_URL}`: Sandbox service URL
        - `${PLUGIN_URL}`: Plugin service URL
        - `${AI_PROXY_URL}`: AI proxy service URL

        ## Default Login Information

        - Username: `root`
        - Password: The password you set during template deployment

        ## Usage Guide

        1. After deployment, **first initialize the MongoDB replica set** using the command provided in the MongoDB service instructions
        2. Access FastGPT through the provided domain
        3. Login to the management interface using the root account
        4. Create knowledge bases and upload documents
        5. Configure AI model API Keys
        6. Start using the intelligent Q&A functionality

        ## MongoDB Replica Set Setup

        **IMPORTANT**: After deployment, you must manually initialize the MongoDB replica set for FastGPT to function properly.

        Run this command in the MongoDB service terminal or [Command Execution](https://zeabur.com/docs/deploy/command-execution) interface:

        ```bash
        mongosh -u "${MONGO_USERNAME}" -p "${MONGO_PASSWORD}" --eval "rs.initiate({ _id: \"rs0\", members: [ { _id: 0, host: \"mongodb.zeabur.internal\" }] })"
        ```

        **Note**: Replace the environment variables with the actual MongoDB username and password shown in the MongoDB service instructions, or run this command directly in the MongoDB service terminal where the environment variables will be automatically resolved.

        ## Important Notes

        - **MongoDB replica set must be initialized first** before FastGPT can start successfully
        - Initial startup may take several minutes for database initialization
        - It's recommended to change default passwords in production environments
        - You need to configure OpenAI or other LLM service API Keys for normal Q&A functionality
    services:
        - name: postgresql
          icon: https://raw.githubusercontent.com/zeabur/service-icons/main/marketplace/postgresql.svg
          template: PREBUILT
          spec:
            id: postgresql
            source:
                image: pgvector/pgvector:0.8.0-pg15
            ports:
                - id: database
                  port: 5432
                  type: TCP
            volumes:
                - id: data
                  dir: /var/lib/postgresql/data
            instructions:
                - title: Connection String
                  content: postgresql://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@${PORT_FORWARDED_HOSTNAME}:${DATABASE_PORT_FORWARDED_PORT}/${POSTGRES_DATABASE}
                - title: PostgreSQL Connect Command
                  content: psql "postgresql://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@${PORT_FORWARDED_HOSTNAME}:${DATABASE_PORT_FORWARDED_PORT}/${POSTGRES_DATABASE}"
                - title: PostgreSQL username
                  content: ${POSTGRES_USERNAME}
                - title: PostgresSQL password
                  content: ${POSTGRES_PASSWORD}
                - title: PostgresSQL database
                  content: ${POSTGRES_DATABASE}
                - title: PostgreSQL host
                  content: ${PORT_FORWARDED_HOSTNAME}
                - title: PostgreSQL port
                  content: ${DATABASE_PORT_FORWARDED_PORT}
            env:
                PGDATA:
                    default: /var/lib/postgresql/data/pgdata
                POSTGRES_CONNECTION_STRING:
                    default: postgresql://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DATABASE}
                    expose: true
                POSTGRES_DATABASE:
                    default: ${POSTGRES_DB}
                    expose: true
                POSTGRES_DB:
                    default: zeabur
                POSTGRES_HOST:
                    default: ${CONTAINER_HOSTNAME}
                    expose: true
                POSTGRES_PASSWORD:
                    default: root
                    expose: true
                POSTGRES_PORT:
                    default: ${DATABASE_PORT}
                    expose: true
                POSTGRES_URI:
                    default: ${POSTGRES_CONNECTION_STRING}
                    expose: true
                POSTGRES_USER:
                    default: root
                POSTGRES_USERNAME:
                    default: ${POSTGRES_USER}
                    expose: true
            configs:
                - path: /docker-entrypoint-initdb.d/01-init-pgvector.sql
                  template: |
                    -- Create pgvector extension
                    CREATE EXTENSION IF NOT EXISTS vector;
                  permission: null
                  envsubst: null
                - path: /etc/postgresql/postgresql.conf
                  template: |
                    # https://github.com/postgres/postgres/blob/master/src/backend/utils/misc/postgresql.conf.sample
                    listen_addresses = '*'
                    max_connections = 100
                    shared_buffers = 128MB
                    dynamic_shared_memory_type = posix
                    max_wal_size = 1GB
                    min_wal_size = 80MB
                    log_timezone = 'Etc/UTC'
                    datestyle = 'iso, mdy'
                    timezone = 'Etc/UTC'
                    lc_messages = 'en_US.utf8'
                    lc_monetary = 'en_US.utf8'
                    lc_numeric = 'en_US.utf8'
                    lc_time = 'en_US.utf8'
                    default_text_search_config = 'pg_catalog.english'
                  permission: null
                  envsubst: null
            healthCheck:
                type: TCP
                port: database
        - name: mongodb
          icon: https://cdn.zeabur.com/marketplace/mongodb.svg
          template: PREBUILT
          spec:
            id: mongodb
            source:
                image: mongo:7.0
                command:
                    - sh
                args:
                    - /usr/local/bin/docker-entrypoint-patched.sh
            ports:
                - id: database
                  port: 27017
                  type: TCP
            volumes:
                - id: data
                  dir: /data/db
            instructions:
                - title: Command to connect to your MongoDB
                  content: mongosh "mongodb://${MONGO_USERNAME}:${MONGO_PASSWORD}@${PORT_FORWARDED_HOSTNAME}:${DATABASE_PORT_FORWARDED_PORT}"
                - title: MongoDB connection string
                  content: mongodb://${MONGO_USERNAME}:${MONGO_PASSWORD}@${PORT_FORWARDED_HOSTNAME}:${DATABASE_PORT_FORWARDED_PORT}
                - title: MongoDB username
                  content: ${MONGO_USERNAME}
                - title: MongoDB password
                  content: ${MONGO_PASSWORD}
                - title: MongoDB host
                  content: ${PORT_FORWARDED_HOSTNAME}
                - title: MongoDB port
                  content: ${DATABASE_PORT_FORWARDED_PORT}
            env:
                MONGO_CONNECTION_STRING:
                    default: mongodb://${MONGO_USERNAME}:${MONGO_PASSWORD}@${MONGO_HOST}:${MONGO_PORT}
                    expose: true
                MONGO_HOST:
                    default: ${CONTAINER_HOSTNAME}
                    expose: true
                MONGO_INITDB_ROOT_PASSWORD:
                    default: ${PASSWORD}
                MONGO_INITDB_ROOT_USERNAME:
                    default: mongo
                MONGO_PASSWORD:
                    default: ${MONGO_INITDB_ROOT_PASSWORD}
                    expose: true
                MONGO_PORT:
                    default: ${DATABASE_PORT}
                    expose: true
                MONGO_URI:
                    default: ${MONGO_CONNECTION_STRING}
                    expose: true
                MONGO_USERNAME:
                    default: ${MONGO_INITDB_ROOT_USERNAME}
                    expose: true
            configs:
                - path: /etc/mongo-keyfile.input
                  template: ofo4ZdSRulfG3aDPcYCwsqRkGqwxFI2n
                  permission: null
                  envsubst: null
                - path: /etc/mongo/mongod.conf
                  template: |
                    security:
                        keyFile: /etc/mongo-keyfile
                    replication:
                        replSetName: rs0
                  permission: null
                  envsubst: null
                - path: /usr/local/bin/docker-entrypoint-patched.sh
                  template: |
                    #!/bin/sh
                    set -ex

                    if [ -f /etc/mongo-keyfile.input ]; then
                        cp /etc/mongo-keyfile.input /etc/mongo-keyfile
                        chmod 0400 /etc/mongo-keyfile
                    fi

                    sed -i '10,23d' /usr/local/bin/docker-entrypoint.sh
                    exec docker-entrypoint.sh mongod --config /etc/mongo/mongod.conf
                  permission: null
                  envsubst: null
        - name: redis
          icon: https://raw.githubusercontent.com/zeabur/service-icons/main/marketplace/redis.svg
          template: PREBUILT
          spec:
            id: redis
            source:
                image: redis/redis-stack-server:latest
            ports:
                - id: database
                  port: 6379
                  type: TCP
            volumes:
                - id: data
                  dir: /data
            instructions:
                - title: Command to connect to your Redis
                  content: redis-cli -h ${PORT_FORWARDED_HOSTNAME} -p ${DATABASE_PORT_FORWARDED_PORT} -a ${REDIS_PASSWORD}
                - title: Redis Connection String
                  content: redis://:${REDIS_PASSWORD}@${PORT_FORWARDED_HOSTNAME}:${DATABASE_PORT_FORWARDED_PORT}
                - title: Redis password
                  content: ${REDIS_PASSWORD}
                - title: Redis host
                  content: ${PORT_FORWARDED_HOSTNAME}
                - title: Redis port
                  content: ${DATABASE_PORT_FORWARDED_PORT}
            env:
                CONFFILE:
                    default: /etc/redis-stack.conf
                REDIS_ARGS:
                    default: --requirepass ${REDIS_PASSWORD}
                REDIS_CONNECTION_STRING:
                    default: redis://:${REDIS_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}
                    expose: true
                REDIS_HOST:
                    default: ${CONTAINER_HOSTNAME}
                    expose: true
                REDIS_PASSWORD:
                    default: ${PASSWORD}
                    expose: true
                REDIS_PORT:
                    default: ${DATABASE_PORT}
                    expose: true
            configs:
                - path: /etc/redis-stack.conf
                  template: |
                    port 6379
                    daemonize no
                  permission: null
                  envsubst: null
            healthCheck:
                type: TCP
                port: database
        - name: minio
          icon: https://cdn.zeabur.com/marketplace/minio.svg
          template: PREBUILT
          spec:
            id: minio
            source:
                image: quay.io/minio/minio:RELEASE.2025-04-22T22-12-26Z
                command:
                    - /bin/sh
                args:
                    - -c
                    - |
                      minio server /data --console-address :9090 &
                      MINIO_PID=$!
                      while ! curl -s http://localhost:9000/minio/health/live; do
                        echo 'Waiting for MinIO to start...'
                        sleep 1
                      done
                      sleep 5
                      mc alias set myminio http://localhost:9000 $MINIO_USERNAME $MINIO_PASSWORD
                      echo "Creating bucket '$MINIO_DEFAULT_BUCKET'"
                      mc mb myminio/$MINIO_DEFAULT_BUCKET
                      wait $MINIO_PID
            ports:
                - id: web
                  port: 9000
                  type: HTTP
                - id: console
                  port: 9090
                  type: HTTP
            volumes:
                - id: data
                  dir: /data
            instructions:
                - title: MinIO Console
                  content: ${MINIO_CONSOLE_URL}
                - title: MinIO Username
                  content: ${MINIO_USERNAME}
                - title: MinIO Password
                  content: ${MINIO_PASSWORD}
                - title: Default Bucket
                  content: ${MINIO_DEFAULT_BUCKET}
            env:
                MINIO_BROWSER_REDIRECT:
                    default: "false"
                MINIO_BUCKET_NAME:
                    default: ${MINIO_DEFAULT_BUCKET}
                    expose: true
                MINIO_CONSOLE_URL:
                    default: ${ZEABUR_CONSOLE_URL}
                    expose: true
                MINIO_DEFAULT_BUCKET:
                    default: uploads
                MINIO_PASSWORD:
                    default: ${MINIO_ROOT_PASSWORD}
                    expose: true
                MINIO_PORT:
                    default: "9000"
                    expose: true
                MINIO_ROOT_PASSWORD:
                    default: ${PASSWORD}
                MINIO_ROOT_USER:
                    default: minio
                MINIO_USERNAME:
                    default: ${MINIO_ROOT_USER}
                    expose: true
        - name: fastgpt
          icon: https://raw.githubusercontent.com/labring/FastGPT/main/.github/imgs/logo.svg
          template: PREBUILT
          spec:
            id: fastgpt
            source:
                image: ghcr.io/labring/fastgpt:v4.12.1-fix
            ports:
                - id: web
                  port: 3000
                  type: HTTP
            volumes:
                - id: config
                  dir: /app/data
            instructions:
                - title: Admin Username
                  content: root
                - title: Admin Password
                  content: ${PASSWORD}
            env:
                AES256_SECRET_KEY:
                    default: fastgptkey
                AIPROXY_API_ENDPOINT:
                    default: http://aiproxy.zeabur.internal:3000
                AIPROXY_API_TOKEN:
                    default: aiproxy
                CHAT_FILE_EXPIRE_TIME:
                    default: "7"
                DB_MAX_LINK:
                    default: "30"
                DEFAULT_ROOT_PSW:
                    default: ${PASSWORD}
                FE_DOMAIN:
                    default: ${ZEABUR_WEB_URL}
                FILE_TOKEN_KEY:
                    default: filetoken
                LOG_LEVEL:
                    default: info
                MONGODB_URI:
                    default: mongodb://${MONGO_USERNAME}:${MONGO_PASSWORD}@${MONGO_HOST}:${MONGO_PORT}
                PG_URL:
                    default: postgresql://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DATABASE}
                PLUGIN_BASE_URL:
                    default: http://fastgpt-plugin.zeabur.internal:3000
                PLUGIN_TOKEN:
                    default: xxxxxx
                REDIS_URL:
                    default: redis://:${REDIS_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}
                ROOT_KEY:
                    default: root_key
                SANDBOX_URL:
                    default: http://sandbox.zeabur.internal:3000
                STORE_LOG_LEVEL:
                    default: warn
                TOKEN_KEY:
                    default: any
                WORKFLOW_MAX_LOOP_TIMES:
                    default: "100"
                WORKFLOW_MAX_RUN_TIMES:
                    default: "1000"
            configs:
                - path: /app/data/config.json
                  template: |
                    {
                      "vectorMaxProcess": 15,
                      "qaMaxProcess": 15,
                      "pgIvfflatProbe": 20
                    }
                  permission: null
                  envsubst: null
          domainKey: PUBLIC_DOMAIN
        - name: sandbox
          icon: https://raw.githubusercontent.com/labring/FastGPT/main/.github/imgs/logo.svg
          template: PREBUILT
          spec:
            id: sandbox
            source:
                image: ghcr.io/labring/fastgpt-sandbox:v4.12.1
            ports:
                - id: web
                  port: 3000
                  type: HTTP
        - name: fastgpt-plugin
          icon: https://raw.githubusercontent.com/labring/FastGPT/main/.github/imgs/logo.svg
          template: PREBUILT
          spec:
            id: fastgpt-plugin
            source:
                image: ghcr.io/labring/fastgpt-plugin:v0.1.10
            ports:
                - id: web
                  port: 3000
                  type: HTTP
            env:
                AUTH_TOKEN:
                    default: xxxxxx
                MINIO_ACCESS_KEY:
                    default: minio
                MINIO_BUCKET:
                    default: fastgpt-plugins
                MINIO_ENDPOINT:
                    default: minio
                MINIO_PORT:
                    default: "9000"
                MINIO_SECRET_KEY:
                    default: ${MINIO_PASSWORD}
                MINIO_USE_SSL:
                    default: "false"
        - name: fastgpt-mcp-server
          icon: https://raw.githubusercontent.com/labring/FastGPT/main/.github/imgs/logo.svg
          template: PREBUILT
          spec:
            id: fastgpt-mcp-server
            source:
                image: ghcr.io/labring/fastgpt-mcp_server:v4.12.1
            ports:
                - id: web
                  port: 3000
                  type: HTTP
            env:
                FASTGPT_ENDPOINT:
                    default: http://fastgpt.zeabur.internal:3000
        - name: aiproxy-pg
          icon: https://cdn.zeabur.com/marketplace/postgresql.svg
          template: PREBUILT
          spec:
            id: aiproxy-pg
            source:
                image: pgvector/pgvector:0.8.0-pg15
            ports:
                - id: database
                  port: 5432
                  type: TCP
            volumes:
                - id: data
                  dir: /var/lib/postgresql/data
            env:
                AIPROXY_DSN:
                    default: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${AIPROXY_PG_HOST}:${AIPROXY_PG_PORT}/${POSTGRES_DB}
                    expose: true
                AIPROXY_PG_HOST:
                    default: ${CONTAINER_HOSTNAME}
                    expose: true
                AIPROXY_PG_PORT:
                    default: ${DATABASE_PORT}
                    expose: true
                POSTGRES_DB:
                    default: aiproxy
                POSTGRES_PASSWORD:
                    default: aiproxy
                POSTGRES_USER:
                    default: postgres
                TZ:
                    default: Asia/Shanghai
            healthCheck:
                type: TCP
                port: database
        - name: aiproxy
          icon: https://raw.githubusercontent.com/labring/FastGPT/main/.github/imgs/logo.svg
          template: PREBUILT
          spec:
            id: aiproxy
            source:
                image: ghcr.io/labring/aiproxy:v0.2.2
            ports:
                - id: web
                  port: 3000
                  type: HTTP
            env:
                ADMIN_KEY:
                    default: aiproxy
                BILLING_ENABLED:
                    default: "false"
                DISABLE_MODEL_CONFIG:
                    default: "true"
                LOG_DETAIL_STORAGE_HOURS:
                    default: "1"
                RETRY_TIMES:
                    default: "3"
                SQL_DSN:
                    default: ${AIPROXY_DSN}
localization:
    zh-CN:
        description: 基于 LLM 大语言模型的知识库问答系统，提供开箱即用的数据处理、模型调用等能力。
        readme: |-
            # FastGPT

            FastGPT 是一个基于 LLM 大语言模型的知识库问答系统，提供开箱即用的数据处理、模型调用等能力。

            ## 功能特性

            - **开箱即用**: 支持直接上传文档、自动数据预处理、向量化及 QA 分割
            - **可视化工作流**: 提供易用的可视化工作流编排，支持更复杂的问答场景
            - **无限扩展**: 支持插件模式，可快速集成新功能
            - **便于调试**: 提供引用追踪、完整的对话日志

            ## 服务组件

            本模板包含以下服务：

            - **FastGPT**: 主应用服务，提供 Web 界面和 API
            - **PostgreSQL**: 向量数据库 (pgvector)，存储向量数据
            - **MongoDB**: 主数据库，存储业务数据
            - **Redis**: 缓存数据库，提供高性能缓存
            - **MinIO**: S3 兼容的对象存储，存储文件
            - **Sandbox**: 代码执行沙箱环境
            - **Plugin**: 插件服务，支持扩展功能
            - **MCP Server**: Model Context Protocol 服务器
            - **AI Proxy**: AI 代理服务，管理模型调用

            ## 环境变量

            部署完成后，以下环境变量将自动配置：

            - `${FASTGPT_URL}`: FastGPT 主服务 URL
            - `${POSTGRES_CONNECTION_STRING}`: PostgreSQL 向量数据库连接字符串
            - `${MONGODB_CONNECTION_STRING}`: MongoDB 数据库连接字符串
            - `${REDIS_CONNECTION_STRING}`: Redis 缓存连接字符串
            - `${MINIO_ENDPOINT}`: MinIO 对象存储端点
            - `${SANDBOX_URL}`: 沙箱服务 URL
            - `${PLUGIN_URL}`: 插件服务 URL
            - `${AI_PROXY_URL}`: AI 代理服务 URL

            ## 默认登录信息

            - 用户名: `root`
            - 密码: 模板变量中设置的 Root 密码

            ## 使用指南

            1. 部署完成后，**首先初始化 MongoDB 副本集**，使用 MongoDB 服务说明中提供的命令
            2. 通过提供的域名访问 FastGPT
            3. 使用 root 账户登录管理界面
            4. 创建知识库并上传文档
            5. 配置 AI 模型 API Key
            6. 开始使用智能问答功能

            ## MongoDB 副本集设置

            **重要**: 部署完成后，您需要手动初始化 MongoDB 副本集，FastGPT 才能正常工作。

            在 MongoDB 服务终端或 [命令执行界面](https://zeabur.com/docs/zh-CN/deploy/command-execution) 中运行此命令：

            ```bash
            mongosh -u "${MONGO_USERNAME}" -p "${MONGO_PASSWORD}" --eval "rs.initiate({ _id: \"rs0\", members: [ { _id: 0, host: \"mongodb.zeabur.internal\" }] })"
            ```

            **注意**: 请将环境变量替换为 MongoDB 服务说明中显示的实际用户名和密码，或直接在 MongoDB 服务终端中运行此命令（环境变量会自动解析）。

            ## 注意事项

            - **必须先初始化 MongoDB 副本集**，FastGPT 才能成功启动
            - 首次启动可能需要数分钟时间进行数据库初始化
            - 建议在生产环境中修改默认密码
            - 需要配置 OpenAI 或其他 LLM 服务的 API Key 才能正常使用问答功能
    zh-TW:
        description: 基於 LLM 大語言模型的知識庫問答系統，提供開箱即用的資料處理、模型調用等能力。
        readme: |-
            # FastGPT

            FastGPT 是一個基於 LLM 大語言模型的知識庫問答系統，提供開箱即用的資料處理、模型調用等能力。

            ## 功能特性

            - **開箱即用**: 支持直接上傳文檔、自動資料預處理、向量化及 QA 分割
            - **可視化工作流**: 提供易用的可視化工作流編排，支持更複雜的問答場景
            - **無限擴展**: 支持插件模式，可快速集成新功能
            - **便於調試**: 提供引用追蹤、完整的對話日誌

            ## 服務組件

            本模板包含以下服務：

            - **FastGPT**: 主應用服務，提供 Web 界面和 API
            - **PostgreSQL**: 向量資料庫 (pgvector)，儲存向量資料
            - **MongoDB**: 主資料庫，儲存業務資料
            - **Redis**: 快取資料庫，提供高效能快取
            - **MinIO**: S3 相容的物件儲存，儲存檔案
            - **Sandbox**: 程式碼執行沙箱環境
            - **Plugin**: 插件服務，支持擴展功能
            - **MCP Server**: Model Context Protocol 伺服器
            - **AI Proxy**: AI 代理服務，管理模型調用

            ## 環境變數

            部署完成後，以下環境變數將自動配置：

            - `${FASTGPT_URL}`: FastGPT 主服務 URL
            - `${POSTGRES_CONNECTION_STRING}`: PostgreSQL 向量資料庫連接字串
            - `${MONGODB_CONNECTION_STRING}`: MongoDB 資料庫連接字串
            - `${REDIS_CONNECTION_STRING}`: Redis 快取連接字串
            - `${MINIO_ENDPOINT}`: MinIO 物件儲存端點
            - `${SANDBOX_URL}`: 沙箱服務 URL
            - `${PLUGIN_URL}`: 插件服務 URL
            - `${AI_PROXY_URL}`: AI 代理服務 URL

            ## 預設登入資訊

            - 使用者名稱: `root`
            - 密碼: 模板變數中設定的 Root 密碼

            ## 使用指南

            1. 部署完成後，**首先初始化 MongoDB 副本集**，使用 MongoDB 服務說明中提供的命令
            2. 透過提供的域名存取 FastGPT
            3. 使用 root 帳戶登入管理界面
            4. 建立知識庫並上傳文檔
            5. 配置 AI 模型 API Key
            6. 開始使用智慧問答功能

            ## MongoDB 副本集設定

            **重要**: 部署完成後，您需要手動初始化 MongoDB 副本集，FastGPT 才能正常工作。

            在 MongoDB 服務終端或 [命令執行介面](https://zeabur.com/docs/zh-TW/deploy/command-execution) 中執行此命令：

            ```bash
            mongosh -u "${MONGO_USERNAME}" -p "${MONGO_PASSWORD}" --eval "rs.initiate({ _id: \"rs0\", members: [ { _id: 0, host: \"mongodb.zeabur.internal\" }] })"
            ```

            **注意**: 請將環境變數替換為 MongoDB 服務說明中顯示的實際使用者名稱和密碼，或直接在 MongoDB 服務終端中執行此命令（環境變數會自動解析）。

            ## 注意事項

            - **必須先初始化 MongoDB 副本集**，FastGPT 才能成功啟動
            - 首次啟動可能需要數分鐘時間進行資料庫初始化
            - 建議在生產環境中修改預設密碼
            - 需要配置 OpenAI 或其他 LLM 服務的 API Key 才能正常使用問答功能
