# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: ChartDB
spec:
    description: Open-source database diagrams editor
    icon: https://avatars.githubusercontent.com/u/177466511?s=280&v=4
    variables:
        - key: PUBLIC_DOMAIN
          type: DOMAIN
          name: Domain
          description: The domain you want to bind the ChartDB to?
    tags:
        - Tool
    readme: "# ChartDB\nVisualize your DB via one-single query.\n\nFree and open source, database design editor. \n\nNo signup -> get a diagram in just 15sec.\n\nThe self-hosted version can create unlimited diagrams and tables, but if you want to share diagrams across devices, you still need to use ChartDB's paid service.\n\n## Reference\nMore configurations and instructions: [https://github.com/chartdb/chartdb](https://github.com/chartdb/chartdb)"
    services:
        - name: chartdb
          icon: https://avatars.githubusercontent.com/u/177466511?s=280&v=4z
          template: PREBUILT_V2
          spec:
            source:
                source: GITHUB
                repo: 838212912
                branch: main
            ports:
                - id: web
                  port: 80
                  type: HTTP
            env:
                OPENAI_API_KEY:
                    default: ""
                    expose: false
                PORT:
                    default: ${WEB_PORT}
                    expose: false
                PUBLIC_DOMAIN:
                    default: ""
                    expose: false
                VITE_LLM_MODEL_NAME:
                    default: ""
                    expose: false
                VITE_OPENAI_API_ENDPOINT:
                    default: ""
                    expose: false
            configs: []
          domainKey: PUBLIC_DOMAIN
localization:
    zh-TW:
        description: 開源的資料庫圖表編輯器
        variables:
            - key: PUBLIC_DOMAIN
              type: DOMAIN
              name: 網域
              description: 你想將 ChartDB 綁定到哪個網域？
            - key: OPENAI_API_KEY
              type: STRING
              name: OpenAI API Key
              description: OpenAI 的 API 金鑰 (需提供才可使用生成功能)
            - key: VITE_OPENAI_API_ENDPOINT
              type: STRING
              name: OpenAI API Endpoint
              description: OpenAI 提供的 API 服務的 URL (可留空)
            - key: VITE_LLM_MODEL_NAME
              type: STRING
              name: LLM Model Name
              description: 要使用的 LLM 模型名稱 (可留空)
        readme: |-
            # ChartDB
            透過一個查詢視覺化您的資料庫。免費且開源，資料庫設計編輯器。

            無需註冊 -> 只需 15 秒即可獲得圖表。

            自架的版本可以建立無限的圖表與表格，但若要跨裝置共享圖表，目前依然需要使用 ChartDB 的付費服務。

            ## 參考
            更多配置跟說明請參考: [https://github.com/chartdb/chartdb](https://github.com/chartdb/chartdb)
