# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: n8n
spec:
    description: |
        n8n workflow automation. Previously bound to git-2.00900.vip on DigitalOcean (port 5678).
    coverImage: https://raw.githubusercontent.com/n8n-io/n8n/master/assets/n8n-logo.png
    icon: https://raw.githubusercontent.com/n8n-io/n8n/master/assets/n8n-logo.png
    variables:
        - key: PUBLIC_DOMAIN
          type: DOMAIN
          name: Domain
          description: Public domain (e.g. n8n.z88.dev)
        - key: N8N_ENCRYPTION_KEY
          type: PASSWORD
          name: Encryption Key
          description: n8n encryption key for credentials (keep stable)
    tags:
        - Automation
        - Workflow
        - Tool
    readme: |
        # n8n

        Official image `n8nio/n8n`.

        ## Legacy

        - Host: DO 安全 `157.230.36.236`
        - Domain: `git-2.00900.vip` → host nginx → `:5678`

        ## After deploy

        Open PUBLIC_DOMAIN and create owner account on first visit.
    services:
        - name: n8n
          icon: https://raw.githubusercontent.com/n8n-io/n8n/master/assets/n8n-logo.png
          template: PREBUILT_V2
          spec:
            id: n8n
            source:
                image: n8nio/n8n:latest
            ports:
                - id: web
                  port: 5678
                  type: HTTP
            volumes:
                - id: data
                  dir: /home/node/.n8n
            env:
                GENERIC_TIMEZONE:
                    default: Asia/Shanghai
                N8N_ENCRYPTION_KEY:
                    default: ${N8N_ENCRYPTION_KEY}
                N8N_HOST:
                    default: ${PUBLIC_DOMAIN}
                N8N_PORT:
                    default: "5678"
                N8N_PROTOCOL:
                    default: https
                WEBHOOK_URL:
                    default: https://${PUBLIC_DOMAIN}/
            healthCheck:
                type: HTTP
                port: web
                http:
                    path: /healthz
          domainKey: PUBLIC_DOMAIN
localization:
    zh-CN:
        description: n8n 工作流自动化。原域名 git-2.00900.vip（DO 安全机 :5678）。
        variables:
            - key: PUBLIC_DOMAIN
              type: DOMAIN
              name: 域名
              description: 公网域名（如 n8n.z88.dev）
            - key: N8N_ENCRYPTION_KEY
              type: PASSWORD
              name: 加密密钥
              description: 凭证加密密钥（勿随意更换）
        readme: |
            # n8n

            官方镜像一键部署。打开域名完成初始化。
