# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: DS2API
spec:
    description: DeepSeek Web 对话转 OpenAI/Claude/Gemini 兼容 API（Go 实现，含 WebUI）
    tags:
        - DeepSeek
        - API
        - Go
    readme: |-
        # DS2API (Zeabur)

        ## After deployment
        - Admin panel: `/admin`
        - Health check: `/healthz`
        - Config is persisted at `/data/config.json` (mounted volume)

        ## First-time setup
        1. Open your service URL, then visit `/admin`
        2. Login with `DS2API_ADMIN_KEY` (shown in Zeabur env/instructions)
        3. Import / edit config in Admin UI (saved to `/data/config.json`)
    services:
        - name: ds2api
          template: GIT
          spec:
            id: ds2api
            source:
                source: GITHUB
                repo: 1139136822
                branch: main
                rootDirectory: /
            ports:
                - id: web
                  port: 5001
                  type: HTTP
            volumes:
                - id: data
                  dir: /data
            instructions:
                - title: Admin panel
                  content: Visit `/admin` on your service URL.
                - title: DS2API admin key
                  content: ${DS2API_ADMIN_KEY}
            env:
                DS2API_ADMIN_KEY:
                    default: ${PASSWORD}
                    expose: true
                DS2API_CONFIG_PATH:
                    default: /data/config.json
                LOG_LEVEL:
                    default: INFO
                PORT:
                    default: "5001"
            healthCheck:
                type: HTTP
                port: web
                http:
                    path: /healthz
