# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: Pyrodactyl
spec:
    description: A powerful game server management panel based on Pterodactyl, with improved performance and developer experience.
    coverImage: https://raw.githubusercontent.com/pyrohost/pyrodactyl/9c79e57de25d7bed1b7b6a169673368f5731c561/.github/server-menu.png
    icon: https://raw.githubusercontent.com/pyrohost/pyrodactyl/9c79e57de25d7bed1b7b6a169673368f5731c561/public/favicons/favicon.ico
    variables:
        - key: PUBLIC_DOMAIN
          type: DOMAIN
          name: Domain
          description: The domain name for your Pyrodactyl panel
    tags:
        - gaming
        - game-server
    readme: |-
        # Pyrodactyl

        Pyrodactyl is the Pterodactyl-based game server management panel that focuses on performance enhancements, a reimagined accessible interface, and top-tier developer experience. It is faster, smaller, safer, and more accessible than other Pterodactyl forks.

        ## Why Pyrodactyl?

        - **170x smaller** bundle sizes compared to competing forks
        - **16x faster** page loads on average
        - **Sub-7-second cold builds** powered by Turbo and Vite
        - **Security hardened** — modern architecture eliminates most severe CVEs; includes SRI and integrity checks
        - **Fully accessible** — keyboard-navigable, screen-reader compatible, follows current web accessibility standards

        ## Getting Started

        After deployment, open the panel at your configured domain. Create your first admin account by running the following command inside the Pyrodactyl container:

        ```
        php artisan p:user:make
        ```

        Then configure an Elytra node under the **Admin → Nodes** section to start deploying game servers.

        > **Note:** Pyrodactyl requires a separate Elytra node to actually run game servers. The panel only provides the management UI and API.

        ## Architecture

        This template deploys three services:
        - **Pyrodactyl** — the panel web application
        - **MariaDB** — relational database for panel data
        - **Redis** — cache, session, and queue backend

        ## Links

        - Website: https://pyrodactyl.dev/
        - Documentation: https://pyrodactyl.dev/docs/pyrodactyl
        - Installation Guide: https://pyrodactyl.dev/docs/pyrodactyl/installation
        - GitHub: https://github.com/pyrodactyl-oss/pyrodactyl
        - Elytra: https://github.com/pyrohost/elytra
    resourceRequirement:
        minConfig:
            cpu: 1
            ram: 2
        recommendedConfig:
            cpu: 2
            ram: 4
    services:
        - name: Pyrodactyl
          icon: https://raw.githubusercontent.com/pyrohost/pyrodactyl/9c79e57de25d7bed1b7b6a169673368f5731c561/public/favicons/favicon.ico
          dependencies:
            - redis
            - mariadb
          template: PREBUILT_V2
          spec:
            source:
                image: ghcr.io/pyrodactyl-oss/pyrodactyl:v5.0.3
            ports:
                - id: http
                  port: 80
                  type: HTTP
            volumes:
                - id: var
                  dir: /app/var
                - id: logs
                  dir: /app/storage/logs
            env:
                APP_ENV:
                    default: production
                APP_TIMEZONE:
                    default: UTC
                APP_URL:
                    default: https://${PUBLIC_DOMAIN}
                CACHE_DRIVER:
                    default: redis
                DB_CONNECTION:
                    default: mariadb
                DB_DATABASE:
                    default: ${MARIADB_DATABASE}
                DB_HOST:
                    default: ${MARIADB_HOST}
                DB_PASSWORD:
                    default: ${MARIADB_PASSWORD}
                DB_PORT:
                    default: ${MARIADB_PORT}
                DB_USERNAME:
                    default: ${MARIADB_USER}
                QUEUE_DRIVER:
                    default: redis
                SESSION_DRIVER:
                    default: redis
            healthCheck:
                type: HTTP
                port: http
                http:
                    path: /
          domainKey: PUBLIC_DOMAIN
        - name: mariadb
          icon: https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/mariadb.png
          template: PREBUILT_V2
          spec:
            source:
                image: mariadb:11.8.6
            ports:
                - id: database
                  port: 3306
                  type: TCP
            volumes:
                - id: data
                  dir: /var/lib/mysql
            env:
                MARIADB_DATABASE:
                    default: panel
                    expose: true
                MARIADB_HOST:
                    default: ${CONTAINER_HOSTNAME}
                    expose: true
                MARIADB_PASSWORD:
                    default: ${PASSWORD}
                    expose: true
                MARIADB_PORT:
                    default: ${DATABASE_PORT}
                    expose: true
                MARIADB_ROOT_PASSWORD:
                    default: ${PASSWORD}
                MARIADB_USER:
                    default: pyrodactyl
                    expose: true
            healthCheck:
                type: TCP
                port: database
            portForwarding:
                enabled: false
        - name: redis
          icon: https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/redis.png
          template: PREBUILT_V2
          spec:
            source:
                image: redis/redis-stack-server:7.4.0-v8
            ports:
                - id: database
                  port: 6379
                  type: TCP
            volumes:
                - id: data
                  dir: /data
            env:
                REDIS_ARGS:
                    default: --requirepass ${PASSWORD}
                REDIS_HOST:
                    default: ${CONTAINER_HOSTNAME}
                    expose: true
                REDIS_PASSWORD:
                    default: ${PASSWORD}
                    expose: true
                REDIS_PORT:
                    default: ${DATABASE_PORT}
                    expose: true
            healthCheck:
                type: TCP
                port: database
            portForwarding:
                enabled: false
localization:
    zh-CN:
        description: 基于 Pterodactyl 的强效游戏服务器管理面板，注重性能与开发者体验。
        variables:
            - key: PUBLIC_DOMAIN
              type: DOMAIN
              name: 域名
              description: 你想将 Pyrodactyl 管理面板绑定到哪个域名上？
        readme: |-
            # Pyrodactyl

            Pyrodactyl 是以 Pterodactyl 为基础的游戏服务器管理面板，专注于性能提升、无障碍设计与顶尖的开发者体验。比其他 Pterodactyl 分支更快、更小、更安全、更易用。

            ## 为什么选择 Pyrodactyl？

            - **缩小 170 倍** — 打包体积比竞争分支小 170 倍以上
            - **快 16 倍** — 平均页面加载速度提升 16 倍
            - **冷构建不到 7 秒** — 由 Turbo 与 Vite 驱动的极速构建
            - **强化安全性** — 现代架构消除大多数严重 CVE，内置 SRI 与完整性验证
            - **完整无障碍** — 支持键盘导航、屏幕阅读器，符合最新 Web 无障碍标准

            ## 快速开始

            部署完成后，前往配置的域名打开面板。在 Pyrodactyl 容器内执行以下命令创建第一个管理员账号：

            ```
            php artisan p:user:make
            ```

            然后在 **管理 → 节点** 页面配置 Elytra 节点，即可开始部署游戏服务器。

            > **注意：** Pyrodactyl 需要独立的 Elytra 节点才能实际运行游戏服务器，面板本身仅提供管理界面与 API。

            ## 架构说明

            此 Template 部署三个服务：
            - **Pyrodactyl** — 面板网页应用
            - **MariaDB** — 面板数据的关系型数据库
            - **Redis** — 缓存、Session 与队列后端

            ## 相关链接

            - 官方网站：https://pyrodactyl.dev/
            - 官方文档：https://pyrodactyl.dev/docs/pyrodactyl
            - 安装指南：https://pyrodactyl.dev/docs/pyrodactyl/installation
            - GitHub：https://github.com/pyrodactyl-oss/pyrodactyl
            - Elytra：https://github.com/pyrohost/elytra
    zh-TW:
        description: 基於 Pterodactyl 的強效遊戲伺服器管理面板，注重效能與開發者體驗。
        variables:
            - key: PUBLIC_DOMAIN
              type: DOMAIN
              name: 網域
              description: 你想將 Pyrodactyl 管理面板綁在哪個網域上？
        readme: |-
            # Pyrodactyl

            Pyrodactyl 是以 Pterodactyl 為基礎的遊戲伺服器管理面板，專注於效能提升、無障礙設計與頂尖的開發者體驗。比其他 Pterodactyl 分支更快、更小、更安全、更易用。

            ## 為什麼選擇 Pyrodactyl？

            - **縮小 170 倍** — 打包體積比競爭分支小 170 倍以上
            - **快 16 倍** — 平均頁面載入速度提升 16 倍
            - **冷建置不到 7 秒** — 由 Turbo 與 Vite 驅動的極速建置
            - **強化安全性** — 現代架構消除大多數嚴重 CVE，內建 SRI 與完整性驗證
            - **完整無障礙** — 支援鍵盤導覽、螢幕閱讀器，符合最新 Web 無障礙標準

            ## 開始使用

            部署完成後，前往設定的網域開啟面板。在 Pyrodactyl 容器內執行以下指令建立第一個管理員帳號：

            ```
            php artisan p:user:make
            ```

            接著在 **管理 → 節點** 頁面設定 Elytra 節點，即可開始部署遊戲伺服器。

            > **注意：** Pyrodactyl 需要獨立的 Elytra 節點才能實際執行遊戲伺服器，面板本身僅提供管理介面與 API。

            ## 架構說明

            此 Template 部署三個服務：
            - **Pyrodactyl** — 面板網頁應用程式
            - **MariaDB** — 面板資料的關聯式資料庫
            - **Redis** — 快取、Session 與佇列後端

            ## 相關連結

            - 官方網站：https://pyrodactyl.dev/
            - 官方文件：https://pyrodactyl.dev/docs/pyrodactyl
            - 安裝指南：https://pyrodactyl.dev/docs/pyrodactyl/installation
            - GitHub：https://github.com/pyrodactyl-oss/pyrodactyl
            - Elytra：https://github.com/pyrohost/elytra
