# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: ConvertX
spec:
    description: Self-hosted online file converter. Supports 1000+ formats
    coverImage: https://raw.githubusercontent.com/C4illin/ConvertX/main/images/logo.png
    icon: https://raw.githubusercontent.com/C4illin/ConvertX/refs/heads/main/public/favicon.svg
    tags:
        - Tool
        - Converter
    readme: |-
        # ConvertX

        A self-hosted online file converter. Supports over a thousand different formats. Written with TypeScript, Bun and Elysia.

        ## Features

        - Convert files to different formats
        - Process multiple files at once
        - Password protection
        - Multiple accounts

        ## Converters supported

        | Converter                                          | Use case         | Converts from | Converts to |
        | -------------------------------------------------- | ---------------- | ------------- | ----------- |
        | [libjxl](https://github.com/libjxl/libjxl)         | JPEG XL          | 11            | 11          |
        | [resvg](https://github.com/RazrFalcon/resvg)       | SVG              | 1             | 1           |
        | [Vips](https://github.com/libvips/libvips)         | Images           | 45            | 23          |
        | [libheif](https://github.com/strukturag/libheif)   | HEIF             | 2             | 4           |
        | [XeLaTeX](https://tug.org/xetex/)                  | LaTeX            | 1             | 1           |
        | [Calibre](https://calibre-ebook.com/)              | E-books          | 26            | 19          |
        | [Pandoc](https://pandoc.org/)                      | Documents        | 43            | 65          |
        | [dvisvgm](https://dvisvgm.de/)                     | Vector images    | 4             | 2           |
        | [ImageMagick](https://imagemagick.org/)            | Images           | 245           | 183         |
        | [GraphicsMagick](http://www.graphicsmagick.org/)   | Images           | 167           | 130         |
        | [Inkscape](https://inkscape.org/)                  | Vector images    | 7             | 17          |
        | [Assimp](https://github.com/assimp/assimp)         | 3D Assets        | 77            | 23          |
        | [FFmpeg](https://ffmpeg.org/)                      | Video            | ~472          | ~199        |
        | [Potrace](https://potrace.sourceforge.net/)        | Raster to vector | 4             | 11          |
        | [VTracer](https://github.com/visioncortex/vtracer) | Raster to vector | 8             | 1           |
        | [Dasel](https://github.com/TomWright/dasel)        | Data Files       | 5             | 4           |

        ## Environment variables

        All are optional, JWT_SECRET is recommended to be set.

        | Name                         | Default                                            | Description                                                                                                               |
        | ---------------------------- | -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
        | JWT_SECRET                   | when unset it will use the value from randomUUID() | A long and secret string used to sign the JSON Web Token                                                                  |
        | ACCOUNT_REGISTRATION         | false                                              | Allow users to register accounts                                                                                          |
        | HTTP_ALLOWED                 | false                                              | Allow HTTP connections, only set this to true locally                                                                     |
        | ALLOW_UNAUTHENTICATED        | false                                              | Allow unauthenticated users to use the service, only set this to true locally                                             |
        | AUTO_DELETE_EVERY_N_HOURS    | 24                                                 | Checks every n hours for files older then n hours and deletes them, set to 0 to disable                                   |
        | WEBROOT                      |                                                    | The address to the root path setting this to "/convert" will serve the website on "example.com/convert/"                  |
        | FFMPEG_ARGS                  |                                                    | Arguments to pass to ffmpeg, e.g. `-preset veryfast`                                                                      |
        | HIDE_HISTORY                 | false                                              | Hide the history page                                                                                                     |
        | LANGUAGE                     | en                                                 | Language to format date strings in, specified as a [BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) |
        | UNAUTHENTICATED_USER_SHARING | false                                              | Shares conversion history between all unauthenticated users                                                               |
    services:
        - name: ConvertX
          icon: https://raw.githubusercontent.com/C4illin/ConvertX/refs/heads/main/public/favicon.svg
          template: PREBUILT_V2
          spec:
            id: convertx
            source:
                image: c4illin/convertx:latest
            ports:
                - id: web
                  port: 3000
                  type: HTTP
            volumes:
                - id: data
                  dir: /app/data
            env:
                JWT_SECRET:
                    default: ${PASSWORD}
                LANGUAGE:
                    default: en
localization:
    zh-CN:
        description: Self-hosted 在线文件转换器。支持 1000 多种格式
        readme: |-
            # ConvertX

            一个自托管的在线文件转换器。支持一千多种不同的格式。使用 TypeScript、Bun 和 Elysia 编写

            ## 功能

            - 将文件转换为不同的格式
            - 一次处理多个文件
            - 密码保护
            - 多账户

            ## 支持的转换器

            | Converter                                          | Use case         | Converts from | Converts to |
            | -------------------------------------------------- | ---------------- | ------------- | ----------- |
            | [libjxl](https://github.com/libjxl/libjxl)         | JPEG XL          | 11            | 11          |
            | [resvg](https://github.com/RazrFalcon/resvg)       | SVG              | 1             | 1           |
            | [Vips](https://github.com/libvips/libvips)         | Images           | 45            | 23          |
            | [libheif](https://github.com/strukturag/libheif)   | HEIF             | 2             | 4           |
            | [XeLaTeX](https://tug.org/xetex/)                  | LaTeX            | 1             | 1           |
            | [Calibre](https://calibre-ebook.com/)              | E-books          | 26            | 19          |
            | [Pandoc](https://pandoc.org/)                      | Documents        | 43            | 65          |
            | [dvisvgm](https://dvisvgm.de/)                     | Vector images    | 4             | 2           |
            | [ImageMagick](https://imagemagick.org/)            | Images           | 245           | 183         |
            | [GraphicsMagick](http://www.graphicsmagick.org/)   | Images           | 167           | 130         |
            | [Inkscape](https://inkscape.org/)                  | Vector images    | 7             | 17          |
            | [Assimp](https://github.com/assimp/assimp)         | 3D Assets        | 77            | 23          |
            | [FFmpeg](https://ffmpeg.org/)                      | Video            | ~472          | ~199        |
            | [Potrace](https://potrace.sourceforge.net/)        | Raster to vector | 4             | 11          |
            | [VTracer](https://github.com/visioncortex/vtracer) | Raster to vector | 8             | 1           |
            | [Dasel](https://github.com/TomWright/dasel)        | Data Files       | 5             | 4           |

            ## 环境变量

            所有变量都是可选的，建议设置 `JWT_SECRET`

            | Name                         | Default                                            | Description                                                                                                               |
            | ---------------------------- | -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
            | JWT_SECRET                   | 未设置时，将使用randomUUID()的值                       | 用于签署JSON Web令牌的长且保密的字符串                                                                                          |
            | ACCOUNT_REGISTRATION         | false                                              | 允许用户注册帐户                                                                                                             |
            | HTTP_ALLOWED                 | false                                              | 允许HTTP连接，仅在本地将其设置为true                                                                                            |
            | ALLOW_UNAUTHENTICATED        | false                                              | 允许未经身份验证的用户使用该服务，仅在本地将其设置为true                                                                             |
            | AUTO_DELETE_EVERY_N_HOURS    | 24                                                 | 每n小时检查一次是否有超过n小时的文件并将其删除，设置为0以禁用                                                                         |
            | WEBROOT                      |                                                    | 根路径的地址，将其设置为“/convert”将在“example.com/convert/”上提供网站                                                             |
            | FFMPEG_ARGS                  |                                                    | 传递给ffmpeg的参数，例如`-preset veryfast`                                                                                     |
            | HIDE_HISTORY                 | false                                              | 隐藏历史页面                                                                                                                  |
            | LANGUAGE                     | en                                                 | 用于格式化日期字符串的语言，指定为[BCP 47语言标签](https://en.wikipedia.org/wiki/IETF_language_tag)                                 |
            | UNAUTHENTICATED_USER_SHARING | false                                              | 在所有未经身份验证的用户之间共享转换历史                                                                                           |
