# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: Storage UI
spec:
    description: |
        Storage UI is an open-source file browser for S3, R2, and other compatible storage backends. Browse, preview, search, and manage files from a self-hosted web interface.
    coverImage: https://raw.githubusercontent.com/hahahumble/storageui/main/public/readme/github-banner.png
    icon: https://raw.githubusercontent.com/hahahumble/storageui/main/public/icon.svg
    variables:
        - key: PUBLIC_DOMAIN
          type: DOMAIN
          name: Public domain
          description: The public domain for the Storage UI web interface. You can let Zeabur generate a zeabur.app domain.
    tags:
        - Storage
        - File Management
        - Self-Hosted
    readme: |
        # Storage UI on Zeabur

        Storage UI is a self-hosted file browser for S3, Cloudflare R2, MinIO, Alibaba Cloud OSS, Tencent COS, Backblaze B2, and other compatible storage backends.

        ## Getting started

        1. Deploy this template and open the generated domain.
        2. Use the generated username and password shown in the service instructions to sign in.
        3. Add a storage connection from the Storage UI interface.

        The default image is pinned to `hahahumble/storageui:0.2.0`. The image is published on Docker Hub for both amd64 and arm64.

        ## Optional server-side storage connections

        You can preconfigure one server-side connection by setting the `STORAGE_1_*` variables in the service environment. Supported providers include `s3`, `r2`, `alibaba`, `tencent`, `backblaze-b2`, `minio`, and `s3-compatible`. Leave these variables empty to configure connections only from the web interface.

        Credentials for connections added in the UI are stored in the browser's local storage. Do not use browser-managed connections on a shared or untrusted computer.

        ## Security

        Login protection is enabled by default. Change `AUTH_USERNAME` and `AUTH_PASSWORD` after deployment if needed. Keep the generated `AUTH_SECRET` stable so existing sessions remain valid across restarts.

        ## Attribution

        - Original project: https://github.com/hahahumble/storageui
        - Official website and documentation: https://storageui.dev
        - License: Apache-2.0 (https://github.com/hahahumble/storageui/blob/main/LICENSE.md)
    services:
        - name: storage-ui
          icon: https://raw.githubusercontent.com/hahahumble/storageui/main/public/icon.svg
          template: PREBUILT_V2
          spec:
            id: storage-ui
            source:
                image: hahahumble/storageui:0.2.0
            ports:
                - id: web
                  port: 3000
                  type: HTTP
            instructions:
                - title: Storage UI URL
                  content: ${ZEABUR_WEB_URL}
                - title: Login username
                  content: ${AUTH_USERNAME}
                - title: Login password
                  content: ${AUTH_PASSWORD}
            env:
                AUTH_PASSWORD:
                    default: ${PASSWORD}
                    expose: true
                AUTH_SECRET:
                    default: ${PASSWORD}
                AUTH_USERNAME:
                    default: admin
                    expose: true
                NEXT_PUBLIC_APP_URL:
                    default: ${ZEABUR_WEB_URL}
                STORAGE_1_ACCESS_KEY_ID:
                    default: ""
                STORAGE_1_ACCOUNT_ID:
                    default: ""
                STORAGE_1_BUCKET:
                    default: ""
                STORAGE_1_ENDPOINT:
                    default: ""
                STORAGE_1_FORCE_PATH_STYLE:
                    default: "false"
                STORAGE_1_NAME:
                    default: ""
                STORAGE_1_PROVIDER:
                    default: s3
                STORAGE_1_PUBLIC_BASE_URL:
                    default: ""
                STORAGE_1_READ_ONLY:
                    default: "false"
                STORAGE_1_REGION:
                    default: ""
                STORAGE_1_SECRET_ACCESS_KEY:
                    default: ""
            healthCheck:
                type: TCP
                port: web
          domainKey: PUBLIC_DOMAIN
localization:
    es-ES:
        description: |
            Storage UI es un explorador de archivos de código abierto para S3, R2 y otros backends compatibles, con una interfaz web autoalojada para explorar, previsualizar, buscar y administrar archivos.
        variables:
            - key: PUBLIC_DOMAIN
              type: DOMAIN
              name: Dominio público
              description: Dominio público de la interfaz web de Storage UI. Zeabur puede generar automáticamente un dominio zeabur.app.
        readme: |
            # Storage UI en Zeabur

            Storage UI es un explorador de archivos autoalojado compatible con S3, Cloudflare R2, MinIO, Alibaba Cloud OSS, Tencent COS, Backblaze B2 y otros backends compatibles.

            Después del despliegue, abre el dominio generado e inicia sesión con el usuario y la contraseña mostrados en las instrucciones del servicio. Después puedes añadir conexiones de almacenamiento desde la interfaz.

            También puedes configurar una conexión del lado del servidor con las variables `STORAGE_1_*`. Las conexiones añadidas desde la interfaz se guardan en el localStorage del navegador.

            Proyecto original: https://github.com/hahahumble/storageui

            Licencia: Apache-2.0 (https://github.com/hahahumble/storageui/blob/main/LICENSE.md)
    id-ID:
        description: |
            Storage UI adalah penjelajah berkas sumber terbuka untuk S3, R2, dan backend penyimpanan kompatibel lainnya, dengan antarmuka web self-hosted untuk menelusuri, melihat pratinjau, mencari, dan mengelola berkas.
        variables:
            - key: PUBLIC_DOMAIN
              type: DOMAIN
              name: Domain publik
              description: Domain publik untuk antarmuka web Storage UI. Zeabur dapat membuat domain zeabur.app secara otomatis.
        readme: |
            # Storage UI di Zeabur

            Storage UI adalah penjelajah berkas self-hosted yang mendukung S3, Cloudflare R2, MinIO, Alibaba Cloud OSS, Tencent COS, Backblaze B2, dan backend kompatibel lainnya.

            Setelah deployment, buka domain yang dibuat dan masuk menggunakan nama pengguna serta kata sandi yang ditampilkan dalam instruksi layanan. Setelah itu, tambahkan koneksi penyimpanan dari antarmuka.

            Anda juga dapat mengatur satu koneksi sisi server dengan variabel `STORAGE_1_*`. Koneksi yang ditambahkan dari antarmuka disimpan di localStorage browser.

            Proyek asli: https://github.com/hahahumble/storageui

            Lisensi: Apache-2.0 (https://github.com/hahahumble/storageui/blob/main/LICENSE.md)
    ja-JP:
        description: |
            Storage UI は S3、R2、その他の互換ストレージを扱えるオープンソースのファイルブラウザーです。セルフホスト型の Web UI でファイルを閲覧、プレビュー、検索、管理できます。
        variables:
            - key: PUBLIC_DOMAIN
              type: DOMAIN
              name: 公開ドメイン
              description: Storage UI Web インターフェースの公開ドメインです。Zeabur に zeabur.app ドメインを自動生成させることもできます。
        readme: |
            # Zeabur 上の Storage UI

            Storage UI は S3、Cloudflare R2、MinIO、Alibaba Cloud OSS、Tencent COS、Backblaze B2 などに対応するセルフホスト型ファイルブラウザーです。

            デプロイ後に生成されたドメインを開き、サービスの説明に表示されるユーザー名とパスワードでログインしてから、画面でストレージ接続を追加してください。ログイン保護はデフォルトで有効です。

            `STORAGE_1_*` 環境変数を設定して、サーバー側のストレージ接続を 1 つ事前設定することもできます。画面から追加した接続はブラウザーの localStorage に保存されます。

            Original project: https://github.com/hahahumble/storageui

            License: Apache-2.0（https://github.com/hahahumble/storageui/blob/main/LICENSE.md）
    zh-CN:
        description: |
            Storage UI 是支持 S3、R2 及其他兼容存储后端的开源文件浏览器，提供自托管网页界面来浏览、预览、搜索和管理文件。
        variables:
            - key: PUBLIC_DOMAIN
              type: DOMAIN
              name: 公共域名
              description: Storage UI 网页界面的公共域名，可让 Zeabur 自动生成 zeabur.app 域名。
        readme: |
            # 在 Zeabur 上使用 Storage UI

            Storage UI 是自托管文件浏览器，支持 S3、Cloudflare R2、MinIO、Alibaba Cloud OSS、Tencent COS、Backblaze B2 及其他兼容存储后端。

            部署后打开生成的域名，使用服务说明中显示的用户名和密码登录，再从界面添加存储连接。登录保护默认开启，密码由 Zeabur 自动生成。

            你也可以在服务环境变量中设置 `STORAGE_1_*`，预配置一个服务端存储连接。从界面添加的连接会保存在浏览器 localStorage 中，请不要在不受信任的共享电脑上使用。

            原始项目：https://github.com/hahahumble/storageui

            许可证：Apache-2.0（https://github.com/hahahumble/storageui/blob/main/LICENSE.md）
    zh-TW:
        description: |
            Storage UI 是支援 S3、R2 與其他相容儲存後端的開源檔案瀏覽器，提供自託管的網頁介面來瀏覽、預覽、搜尋和管理檔案。
        variables:
            - key: PUBLIC_DOMAIN
              type: DOMAIN
              name: 公開網域
              description: Storage UI 網頁介面的公開網域，可讓 Zeabur 自動產生 zeabur.app 網域。
        readme: |
            # 在 Zeabur 上使用 Storage UI

            Storage UI 是自託管檔案瀏覽器，支援 S3、Cloudflare R2、MinIO、Alibaba Cloud OSS、Tencent COS、Backblaze B2 及其他相容儲存後端。

            部署後開啟產生的網域，使用服務說明中顯示的帳號密碼登入，再從介面新增儲存連線。登入保護預設開啟，密碼由 Zeabur 自動產生。

            你也可以在服務環境變數中設定 `STORAGE_1_*`，預先建立一個伺服器端儲存連線。從介面新增的連線會儲存在瀏覽器 localStorage，請不要在不受信任的共用電腦上使用。

            原始專案：https://github.com/hahahumble/storageui

            授權條款：Apache-2.0（https://github.com/hahahumble/storageui/blob/main/LICENSE.md）
