# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: NapCat
spec:
    description: Call the interfaces provided by the QQ Node module to the client to implement Bot functionality.
    icon: https://raw.githubusercontent.com/NapNeko/NapCatDocs/refs/heads/main/src/public/assets/newlogo.png
    variables:
        - key: NapCat_DOMAIN
          type: DOMAIN
          name: NapCat Domain
          description: The domain name of NapCat.
    readme: |
        # NapCat
        ## Configure OneBot Service via WebUI
        After startup, you can find the token information in the startup log, which looks like: [WebUi] WebUi Local Panel Url: http://127.0.0.1:6099/webui?token=xxxx

        Visit https://yourdomain/webui?token=xxxx, then follow these steps:
        1. Enter QQ login, click QRCode for QR code login.
        2. After successful login, you can proceed to network configuration.
        3. After configuration, click save and restart to apply changes.

        ## Network Type Configuration
        HTTP Server: NapCat acts as HTTP request receiver, accepting interface calls and responding in a simplex model

        HTTP Client: NapCat acts as HTTP request initiator, pushing events to plugins/applications in a simplex model

        WebSocket Server: Commonly referred to as Forward WS, capable of both actively pushing events and receiving requests in a duplex model

        WebSocket Client: Commonly referred to as Reverse WS, capable of both actively pushing events and receiving requests in a duplex model
    services:
        - name: NapCat
          icon: https://raw.githubusercontent.com/NapNeko/NapCatDocs/refs/heads/main/src/public/assets/newlogo.png
          template: PREBUILT_V2
          spec:
            source:
                image: mlikiowa/napcat-docker:latest
            ports:
                - id: web
                  port: 6099
                  type: HTTP
                - id: http
                  port: 3000
                  type: HTTP
                - id: wss
                  port: 3001
                  type: HTTP
            volumes:
                - id: qq
                  dir: /app/.config/QQ
                - id: config
                  dir: /app/napcat/config
            env:
                NAPCAT_GID:
                    default: "1000"
                NAPCAT_UID:
                    default: "1000"
          domainKey: NapCat_DOMAIN
localization:
    zh-CN:
        description: 调用QQ Node模块提供给客户端的接口，实现Bot的功能。
        readme: |
            # NapCat
            ## 通过 WebUI 配置OneBot服务
            启动后可在启动日志中看到形如 [WebUi] WebUi Local Panel Url: http://127.0.0.1:6099/webui?token=xxxx 的token信息。

            访问 https://yourdomain/webui?token=xxxx，然后进行以下操作：
            1. 进入 QQ 登录，点击 QRCode 进行二维码登录。
            2. 登录成功后，即可进入网络配置。
            3. 配置完成后，点击保存，重启即可生效。

            ## 配置网络类型
            HTTP服务端: NapCat作为Http请求接受方，接收对应接口调用并回应的单工模型

            HTTP客户端: NapCat作为Http请求发起方，将事件推送至插件/应用相架的单工模型

            WebSocket服务端: 通常指正向WS，既能主动推送事件也能接收请求的双工模型

            WebSocket客户端: 通常指反向WS，既能主动推送事件也能接收请求的双工模型
    zh-TW:
        description: 調用QQ Node模塊提供給客戶端的接口，實現Bot的功能。
        readme: |-
            # NapCat
            ## 透過 WebUI 配置OneBot服務
            啟動後可在啟動日誌中看到形如 [WebUi] WebUi Local Panel Url: http://127.0.0.1:6099/webui?token=xxxx 的token資訊。

            訪問 https://yourdomain/webui?token=xxxx，然後進行以下操作：
            1. 進入 QQ 登入，點擊 QRCode 進行二維碼登入。
            2. 登入成功後，即可進入網路配置。
            3. 配置完成後，點擊儲存，重新啟動即可生效。

            ## 配置網路類型
            HTTP伺服器: NapCat作為Http請求接受方，接收對應介面調用並回應的單工模型

            HTTP客戶端: NapCat作為Http請求發起方，將事件推送至插件/應用相架的單工模型

            WebSocket伺服器: 通常指正向WS，既能主動推送事件也能接收請求的雙工模型

            WebSocket客戶端: 通常指反向WS，既能主動推送事件也能接收請求的雙工模型
