# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: ChatGPT Team Helper
spec:
    description: A multi-channel Team account management platform with auto-delivery, points system and RBAC.
    coverImage: https://github.com/user-attachments/assets/e5fcd950-7844-4ff7-be00-28246024a847
    icon: https://github.com/user-attachments/assets/e5fcd950-7844-4ff7-be00-28246024a847
    variables:
        - key: JWT_SECRET
          type: STRING
          name: JWT Secret
          description: A random string for authentication (REQUIRED). Generate with "openssl rand -hex 32" or use any 32+ character random string.
        - key: INIT_ADMIN_PASSWORD
          type: STRING
          name: Admin Password
          description: Initial admin password (REQUIRED). If left empty, a random password will be generated and shown in logs.
    tags:
        - Tool
        - AI
    readme: "# ChatGPT Team Helper\n\n多渠道 Team 账号管理与兑换平台，支持自动发货、积分体系和权限管理。\n\n---\n\n## \U0001F680 部署完成后\n\n### 第一步：等待服务启动\n等服务状态变成「运行中」（Running）后再进行下一步。\n\n### 第二步：绑定域名\n在 Zeabur 控制台 → 网络 → 公网访问 → 生成域名或自定域名\n\n⚠️ **重要**：必须等服务完全启动后再绑定域名，否则会出现 502 错误。\n\n### 第三步：访问应用\n点击绑定的域名链接即可打开应用。\n\n### 第四步：登录管理后台\n| 项目 | 值 |\n|------|-----|\n| 用户名 | `admin` |\n| 密码 | 你填写的「Admin Password」|\n\n### 如果忘记密码\n前往 Zeabur 控制台 → 选择此服务 → 点击 **Logs** → 搜索 `password`\n\n---\n\n## ✨ 核心功能\n\n| 功能模块 | 说明 |\n|---------|------|\n| 账号管理 | Team 账号全生命周期管理、Token 自动刷新、用户数同步 |\n| 多渠道兑换 | 通用兑换码、小红书、闲鱼、Linux DO OAuth |\n| 订单管理 | Zpay/Credit 双支付网关、订单自动同步 |\n| 积分体系 | 邀请奖励、购买奖励、积分提现 |\n| Telegram Bot | 私聊兑换、库存查询、在线购买 |\n| 权限管理 | 用户/角色/菜单权限 RBAC |\n\n---\n\n## ⚙️ 后续配置（可选）\n\n部署成功后，可在管理后台「系统设置」中配置：\n\n- \U0001F4E7 SMTP 邮件服务\n- \U0001F510 Linux DO OAuth\n- \U0001F916 Telegram 机器人\n- \U0001F4E6 小红书/闲鱼订单同步\n- \U0001F4B3 Zpay/Credit 支付网关\n- \U0001F6E1️ Cloudflare Turnstile 验证\n\n---\n\n## \U0001F4DA 更多文档\n\n- GitHub: https://github.com/Kylsky/chatgpt-team-helper\n- Telegram 交流群: https://t.me/+W7iplSdBGXhlMDc1\n"
    services:
        - name: chatgpt-team-helper
          icon: https://cdn.zeabur.com/prebuilt.svg
          template: PREBUILT_V2
          spec:
            id: chatgpt-team-helper
            source:
                image: ghcr.io/axinhouzilaoyue/chatgpt-team-helper:latest
            ports:
                - id: web
                  port: 5173
                  type: HTTP
            volumes:
                - id: data
                  dir: /app/backend/db
            env:
                INIT_ADMIN_PASSWORD:
                    default: ${INIT_ADMIN_PASSWORD}
                    expose: false
                JWT_SECRET:
                    default: ${JWT_SECRET}
                    expose: false
            configs: []
            healthCheck:
                type: HTTP
                port: web
                http:
                    path: /health
            portForwarding:
                enabled: false
