# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: Convoy
spec:
    description: Open-source enterprise-grade webhook gateway for secure, scalable, and reliable webhook delivery. Bundled with PostgreSQL and Redis.
    coverImage: https://www.getconvoy.io/static/Convoy-OG.png
    icon: https://raw.githubusercontent.com/frain-dev/convoy/main/convoy-logo.svg
    variables:
        - key: PUBLIC_DOMAIN
          type: DOMAIN
          name: Convoy Domain
          description: Public subdomain prefix for the Convoy UI and API (e.g. "convoy" produces convoy.zeabur.app)
    tags:
        - Tool
        - Backend
    readme: |
        # Convoy on Zeabur

        **Convoy** is a fast, secure, open-source webhook gateway. It manages outgoing webhook delivery (with retries, rate limiting, signing, and a delivery log) and incoming webhook ingestion (HMAC verification, sources, replay). This template deploys Convoy in a **one-click, self-hosted** setup on Zeabur, bundled with the two services it needs: **PostgreSQL** for persistence and **Redis** for queueing.

        > Convoy is developed by [Frain Technologies](https://www.getconvoy.io) and released under the [Elastic License 2.0](https://github.com/frain-dev/convoy/blob/main/LICENSE). This template is a deployment recipe — you self-host your own instance and remain in full control of your data and API keys.

        ---

        ## What you get

        Three services in a single project:

        | Service | Image | What it does |
        |---|---|---|
        | `convoy` | `getconvoy/convoy:latest` | API + dashboard + webhook delivery worker (single binary). Auto-runs DB migrations on startup. |
        | `postgresql` | `postgres:18` | Stores projects, endpoints, events, deliveries, attempts |
        | `redis` | `redis/redis-stack-server:latest` | Job queue, rate limit counters, cache |

        Convoy is wired to PostgreSQL and Redis automatically via Zeabur's private networking — no manual configuration required.

        ## Deploy

        1. Click **Deploy** on this template.
        2. Pick a **Convoy Domain** prefix (the default works for testing — you can bind a custom domain later from the Zeabur dashboard).
        3. Wait ~30 seconds for the three services to start. Convoy will run its database migrations automatically on first boot.
        4. Open the URL Zeabur prints for the `convoy` service.

        ## First login

        On first boot, Convoy creates a default superuser. Check the **runtime logs** of the `convoy` service — you'll see something like:

        ```
        Superuser created successfully:
          Username: superuser@default.com
          Password: default
        ```

        Log in with those credentials, then **immediately**:

        1. Create your own organisation and user.
        2. Delete the default `superuser@default.com` account.
        3. Rotate the API keys you'll use for real traffic.

        ## Where to go next

        - **Send your first webhook**: in the dashboard, create a project → add an endpoint → publish an event. Convoy will sign, deliver, and log the attempt.
        - **Ingest incoming webhooks**: configure a Source under your project, and Convoy gives you a URL like `https://convoy.zeabur.app/ingest/<id>` to share with the third party sending webhooks.
        - **API**: full reference at [getconvoy.io/docs/api-reference](https://www.getconvoy.io/docs/api-reference).
        - **Self-host docs**: [getconvoy.io/docs](https://www.getconvoy.io/docs).

        ## Configuration knobs

        All Convoy settings can be tuned via the `convoy` service's **Variables** tab. Useful ones:

        | Variable | What it does |
        |---|---|
        | `CONVOY_HOST` | Public URL of this Convoy instance. Pre-set to your Zeabur domain. Update if you bind a custom domain. |
        | `CONVOY_SIGNUP_ENABLED` | `true` allows new user signup from the UI. Set `false` for a locked-down deployment. |
        | `CONVOY_DB_MAX_OPEN_CONN` | Postgres connection pool size (default 100). Lower this on smaller plans. |
        | `CONVOY_SMTP_*` | SMTP credentials for password-reset / invite emails. Optional. |

        Full env-var reference: [convoy.env.example](https://github.com/frain-dev/convoy/blob/main/convoy.env.example).

        ## Maintenance

        - **Database backups**: Zeabur snapshots PostgreSQL automatically. Restore via the Backup tab on the `postgresql` service.
        - **Upgrades**: Convoy publishes new versions to `getconvoy/convoy:latest`. Restart the `convoy` service to pull the latest image — Convoy will apply any pending DB migrations on the next boot.
        - **Resource sizing**: For light traffic (~10 req/s), the default 1 vCPU / 1 GB tier per service is fine. Bump CPU on the `convoy` service first if delivery latency rises.

        ## Troubleshooting

        - **502 on first deploy**: Convoy needs ~15 s to run migrations before the HTTP server starts. Refresh after a moment.
        - **Migration loop ("retrying in 5s")**: PostgreSQL hasn't finished booting. Convoy retries automatically — give it up to a minute.
        - **Can't see logs of failed deliveries**: check the `event_deliveries` table in PostgreSQL, or use Convoy's UI under Project → Event Deliveries.

        ## Credits

        - Source: [github.com/frain-dev/convoy](https://github.com/frain-dev/convoy) (2,800+ ⭐) · Elastic License 2.0
        - Website: [getconvoy.io](https://www.getconvoy.io)
    services:
        - name: postgresql
          icon: https://cdn.zeabur.com/marketplace/postgresql.svg
          template: PREBUILT
          spec:
            id: postgresql
            source:
                image: postgres:18
                command:
                    - docker-entrypoint.sh
                    - -c
                    - config_file=/etc/postgresql/postgresql.conf
            ports:
                - id: database
                  port: 5432
                  type: TCP
            volumes:
                - id: data
                  dir: /var/lib/postgresql/18/docker
            instructions:
                - title: Connection String
                  content: postgresql://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@${PORT_FORWARDED_HOSTNAME}:${DATABASE_PORT_FORWARDED_PORT}/${POSTGRES_DATABASE}
                - title: PostgreSQL Connect Command
                  content: psql "postgresql://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@${PORT_FORWARDED_HOSTNAME}:${DATABASE_PORT_FORWARDED_PORT}/${POSTGRES_DATABASE}"
                - title: PostgreSQL username
                  content: ${POSTGRES_USERNAME}
                - title: PostgreSQL password
                  content: ${POSTGRES_PASSWORD}
                - title: PostgreSQL database
                  content: ${POSTGRES_DATABASE}
                - title: PostgreSQL host
                  content: ${PORT_FORWARDED_HOSTNAME}
                - title: PostgreSQL port
                  content: ${DATABASE_PORT_FORWARDED_PORT}
            env:
                PGDATA:
                    default: /var/lib/postgresql/18/docker/pgdata
                    expose: false
                POSTGRES_CONNECTION_STRING:
                    default: postgresql://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DATABASE}
                    expose: true
                POSTGRES_DATABASE:
                    default: ${POSTGRES_DB}
                    expose: true
                POSTGRES_DB:
                    default: zeabur
                POSTGRES_HOST:
                    default: ${CONTAINER_HOSTNAME}
                    expose: true
                POSTGRES_PASSWORD:
                    default: ${PASSWORD}
                    expose: true
                POSTGRES_PORT:
                    default: ${DATABASE_PORT}
                    expose: true
                POSTGRES_URI:
                    default: ${POSTGRES_CONNECTION_STRING}
                    expose: true
                POSTGRES_USER:
                    default: root
                POSTGRES_USERNAME:
                    default: ${POSTGRES_USER}
                    expose: true
            configs:
                - path: /etc/postgresql/postgresql.conf
                  template: |
                    listen_addresses = '*'
                    max_connections = 256
                    shared_buffers = 256MB
                    dynamic_shared_memory_type = posix
                    max_wal_size = 1GB
                    min_wal_size = 80MB
                    log_timezone = 'UTC'
                    datestyle = 'iso, mdy'
                    timezone = 'UTC'
                    lc_messages = 'en_US.UTF-8'
                    lc_monetary = 'en_US.UTF-8'
                    lc_numeric = 'en_US.UTF-8'
                    lc_time = 'en_US.UTF-8'
                    default_text_search_config = 'pg_catalog.english'
                  permission: null
                  envsubst: null
        - name: redis
          icon: https://raw.githubusercontent.com/zeabur/service-icons/main/marketplace/redis.svg
          template: PREBUILT
          spec:
            id: redis
            source:
                image: redis/redis-stack-server:latest
            ports:
                - id: database
                  port: 6379
                  type: TCP
            volumes:
                - id: data
                  dir: /data
            instructions:
                - title: Command to connect to your Redis
                  content: redis-cli -h ${PORT_FORWARDED_HOSTNAME} -p ${DATABASE_PORT_FORWARDED_PORT} -a ${REDIS_PASSWORD}
                - title: Redis Connection String
                  content: redis://:${REDIS_PASSWORD}@${PORT_FORWARDED_HOSTNAME}:${DATABASE_PORT_FORWARDED_PORT}
                - title: Redis password
                  content: ${REDIS_PASSWORD}
                - title: Redis host
                  content: ${PORT_FORWARDED_HOSTNAME}
                - title: Redis port
                  content: ${DATABASE_PORT_FORWARDED_PORT}
            env:
                CONFFILE:
                    default: /etc/redis-stack.conf
                REDIS_ARGS:
                    default: --requirepass ${REDIS_PASSWORD}
                REDIS_CONNECTION_STRING:
                    default: redis://:${REDIS_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}
                    expose: true
                REDIS_HOST:
                    default: ${CONTAINER_HOSTNAME}
                    expose: true
                REDIS_PASSWORD:
                    default: ${PASSWORD}
                    expose: true
                REDIS_PORT:
                    default: ${DATABASE_PORT}
                    expose: true
                REDIS_URI:
                    default: ${REDIS_CONNECTION_STRING}
                    expose: true
            configs:
                - path: /etc/redis-stack.conf
                  template: |
                    port 6379
                    daemonize no
                  permission: null
                  envsubst: null
        - name: convoy
          icon: https://raw.githubusercontent.com/frain-dev/convoy/main/convoy-logo.svg
          template: PREBUILT_V2
          spec:
            id: convoy
            source:
                image: getconvoy/convoy:latest
                command:
                    - /bin/sh
                    - -c
                    - |
                      set -e
                      echo "[convoy] running database migrations..."
                      attempt=0
                      until /cmd migrate up; do
                          attempt=$((attempt + 1))
                          if [ "$attempt" -ge 60 ]; then
                              echo "[convoy] migrate failed after 60 attempts" >&2
                              exit 1
                          fi
                          echo "[convoy] migrate attempt $attempt failed (db likely not ready), retrying in 5s..."
                          sleep 5
                      done
                      echo "[convoy] migrations complete; starting server..."
                      exec /cmd server
            ports:
                - id: web
                  port: 8080
                  type: HTTP
            env:
                CONVOY_DB_DSN:
                    default: ${POSTGRES_CONNECTION_STRING}
                CONVOY_HOST:
                    default: ${ZEABUR_WEB_URL}
                CONVOY_NATIVE_REALM_ENABLED:
                    default: "true"
                CONVOY_REDIS_HOST:
                    default: ${REDIS_HOST}
                CONVOY_REDIS_PASSWORD:
                    default: ${REDIS_PASSWORD}
                CONVOY_REDIS_PORT:
                    default: ${REDIS_PORT}
                CONVOY_REDIS_SCHEME:
                    default: redis
                CONVOY_SIGNUP_ENABLED:
                    default: "true"
                PORT:
                    default: "8080"
          domainKey: PUBLIC_DOMAIN
localization:
    es-ES:
        description: Pasarela de Webhooks de código abierto y nivel empresarial para entrega segura, escalable y fiable. PostgreSQL y Redis incluidos.
        variables:
            - key: PUBLIC_DOMAIN
              type: STRING
              name: Dominio de Convoy
              description: Prefijo del subdominio público para la UI y la API de Convoy (por ejemplo, "convoy" produce convoy.zeabur.app)
        readme: |
            # Convoy en Zeabur

            **Convoy** es una pasarela de Webhooks de código abierto, rápida y segura. Gestiona **Webhooks salientes** (reintentos, limitación de tasa, firma, registro de entrega) y **Webhooks entrantes** (verificación HMAC, fuentes, replay). Esta plantilla despliega Convoy **autohospedado con un clic** en Zeabur, junto con los dos servicios que necesita: **PostgreSQL** para persistencia y **Redis** para cola.

            > Convoy es desarrollado por [Frain Technologies](https://www.getconvoy.io) y se distribuye bajo la [Elastic License 2.0](https://github.com/frain-dev/convoy/blob/main/LICENSE). Esta plantilla es solo una receta de despliegue — tú autohospedas tu instancia y mantienes pleno control sobre tus datos y claves API.

            ---

            ## Qué obtienes

            Tres servicios en un solo proyecto:

            | Servicio | Imagen | Función |
            |---|---|---|
            | `convoy` | `getconvoy/convoy:latest` | API, panel y worker de entrega (un único binario). Ejecuta las migraciones de DB al primer arranque. |
            | `postgresql` | `postgres:18` | Almacena proyectos, endpoints, eventos, entregas e intentos |
            | `redis` | `redis/redis-stack-server:latest` | Cola de trabajos, contadores de limitación y caché |

            Convoy se conecta automáticamente a PostgreSQL y Redis a través de la red privada de Zeabur — sin configuración manual.

            ## Desplegar

            1. Haz clic en **Deploy** en esta plantilla.
            2. Elige un prefijo de **Dominio de Convoy** (el valor por defecto sirve para pruebas — puedes asociar un dominio personalizado más tarde).
            3. Espera ~30 segundos a que los tres servicios arranquen. Convoy ejecuta las migraciones automáticamente en el primer arranque.
            4. Abre la URL que Zeabur muestra para el servicio `convoy`.

            ## Primer inicio de sesión

            En el primer arranque, Convoy crea un superusuario por defecto. Mira los **logs en tiempo de ejecución** del servicio `convoy`:

            ```
            Superuser created successfully:
              Username: superuser@default.com
              Password: default
            ```

            Inicia sesión con esas credenciales y, **inmediatamente**:

            1. Crea tu propia organización y usuario.
            2. Elimina la cuenta predeterminada `superuser@default.com`.
            3. Rota las claves API que vayas a usar en producción.

            ## Siguientes pasos

            - **Enviar tu primer Webhook**: en el panel crea un Project → añade un Endpoint → publica un Event. Convoy firmará, entregará y registrará el intento.
            - **Recibir Webhooks**: configura una Source bajo tu Project y Convoy te dará una URL tipo `https://convoy.zeabur.app/ingest/<id>` que puedes compartir con el tercero que envía Webhooks.
            - **API**: referencia completa en [getconvoy.io/docs/api-reference](https://www.getconvoy.io/docs/api-reference).
            - **Documentación autohospedaje**: [getconvoy.io/docs](https://www.getconvoy.io/docs).

            ## Variables configurables

            Todos los ajustes de Convoy se pueden modificar en la pestaña **Variables** del servicio `convoy`. Las más útiles:

            | Variable | Función |
            |---|---|
            | `CONVOY_HOST` | URL pública de la instancia. Preconfigurada con el dominio de Zeabur. Actualízala si asocias un dominio personalizado. |
            | `CONVOY_SIGNUP_ENABLED` | `true` permite el registro desde la UI; `false` bloquea el despliegue. |
            | `CONVOY_DB_MAX_OPEN_CONN` | Tamaño del pool de conexiones PostgreSQL (por defecto 100). Bájalo en planes pequeños. |
            | `CONVOY_SMTP_*` | Credenciales SMTP para recuperación de contraseña / invitaciones. Opcional. |

            Referencia completa: [convoy.env.example](https://github.com/frain-dev/convoy/blob/main/convoy.env.example).

            ## Mantenimiento

            - **Copias de seguridad**: Zeabur hace snapshots automáticos de PostgreSQL. Restaura desde la pestaña Backup del servicio `postgresql`.
            - **Actualizaciones**: las nuevas versiones de Convoy se publican en `getconvoy/convoy:latest`. Reinicia el servicio `convoy` para que descargue la última imagen; las migraciones se aplicarán automáticamente en el siguiente arranque.
            - **Dimensionado**: para tráfico ligero (~10 req/s), 1 vCPU / 1 GB por servicio es suficiente. Si aumenta la latencia de entrega, sube primero la CPU del servicio `convoy`.

            ## Resolución de problemas

            - **502 en el primer despliegue**: Convoy tarda ~15 s en ejecutar las migraciones antes de que el HTTP esté listo. Refresca unos segundos después.
            - **Bucle de migraciones (retrying in 5s)**: PostgreSQL todavía no está listo. Convoy reintenta automáticamente hasta ~1 minuto.
            - **No veo entregas fallidas**: consulta la tabla `event_deliveries` en PostgreSQL, o entra en Convoy UI → Project → Event Deliveries.

            ## Créditos

            - Código: [github.com/frain-dev/convoy](https://github.com/frain-dev/convoy) (2.800+ ⭐) · Elastic License 2.0
            - Sitio web: [getconvoy.io](https://www.getconvoy.io)
    id-ID:
        description: Webhook gateway open-source kelas enterprise untuk pengiriman webhook yang aman, skalabel, dan andal. Disertai PostgreSQL dan Redis.
        variables:
            - key: PUBLIC_DOMAIN
              type: STRING
              name: Domain Convoy
              description: Prefiks subdomain publik untuk UI dan API Convoy (misalnya "convoy" akan menghasilkan convoy.zeabur.app)
        readme: |
            # Convoy di Zeabur

            **Convoy** adalah webhook gateway open-source yang cepat dan aman. Convoy mengelola **webhook keluar** (retry, rate limiting, signing, log pengiriman) dan **webhook masuk** (verifikasi HMAC, source, replay). Template ini menyebarkan Convoy secara **self-hosted satu klik** di Zeabur, lengkap dengan dua layanan yang dibutuhkannya: **PostgreSQL** untuk persistensi dan **Redis** untuk antrian.

            > Convoy dikembangkan oleh [Frain Technologies](https://www.getconvoy.io) dan dirilis di bawah [Elastic License 2.0](https://github.com/frain-dev/convoy/blob/main/LICENSE). Template ini hanya resep deployment — Anda meng-host instance sendiri dan tetap memegang penuh kendali data dan API key Anda.

            ---

            ## Apa yang Anda dapatkan

            Tiga layanan dalam satu proyek:

            | Layanan | Image | Fungsi |
            |---|---|---|
            | `convoy` | `getconvoy/convoy:latest` | API, dashboard, dan worker pengiriman webhook (binary tunggal). Migrasi DB dijalankan otomatis saat booting pertama. |
            | `postgresql` | `postgres:18` | Menyimpan project, endpoint, event, delivery, dan attempt |
            | `redis` | `redis/redis-stack-server:latest` | Antrian job, counter rate limit, cache |

            Convoy otomatis terhubung ke PostgreSQL dan Redis via jaringan privat Zeabur — tidak perlu konfigurasi manual.

            ## Deploy

            1. Klik **Deploy** pada template ini.
            2. Pilih prefiks **Domain Convoy** (default sudah cukup untuk testing — Anda bisa pasang custom domain belakangan dari dashboard Zeabur).
            3. Tunggu ~30 detik sampai ketiga layanan menyala. Convoy akan menjalankan migrasi database otomatis saat booting pertama.
            4. Buka URL yang Zeabur tampilkan untuk layanan `convoy`.

            ## Login pertama

            Saat booting pertama, Convoy membuat superuser default. Lihat **runtime logs** layanan `convoy`:

            ```
            Superuser created successfully:
              Username: superuser@default.com
              Password: default
            ```

            Setelah login dengan kredensial tersebut, **segera**:

            1. Buat organisasi dan user Anda sendiri.
            2. Hapus akun default `superuser@default.com`.
            3. Rotasi API key yang akan Anda gunakan untuk trafik nyata.

            ## Langkah selanjutnya

            - **Kirim webhook pertama**: di dashboard, buat Project → tambahkan Endpoint → publish Event. Convoy akan menandatangani, mengirim, dan mencatat hasilnya.
            - **Terima webhook masuk**: konfigurasikan Source di Project Anda, Convoy akan memberikan URL seperti `https://convoy.zeabur.app/ingest/<id>` untuk dibagikan ke pihak ketiga.
            - **API**: referensi lengkap di [getconvoy.io/docs/api-reference](https://www.getconvoy.io/docs/api-reference).
            - **Dokumentasi self-hosted**: [getconvoy.io/docs](https://www.getconvoy.io/docs).

            ## Variabel yang bisa diatur

            Semua setelan Convoy bisa diatur di tab **Variables** layanan `convoy`. Yang sering dipakai:

            | Variabel | Fungsi |
            |---|---|
            | `CONVOY_HOST` | URL publik instance Convoy. Sudah diset ke domain Zeabur. Update bila Anda pasang custom domain. |
            | `CONVOY_SIGNUP_ENABLED` | `true` mengizinkan signup dari UI; `false` mengunci deployment. |
            | `CONVOY_DB_MAX_OPEN_CONN` | Ukuran connection pool PostgreSQL (default 100). Turunkan di paket kecil. |
            | `CONVOY_SMTP_*` | Konfigurasi SMTP untuk email reset password / undangan. Opsional. |

            Referensi lengkap: [convoy.env.example](https://github.com/frain-dev/convoy/blob/main/convoy.env.example).

            ## Perawatan

            - **Backup database**: Zeabur otomatis snapshot PostgreSQL. Restore dari tab Backup di layanan `postgresql`.
            - **Upgrade**: versi baru Convoy dirilis ke `getconvoy/convoy:latest`. Restart layanan `convoy` untuk menarik image terbaru; migrasi pending akan diterapkan otomatis saat booting berikutnya.
            - **Ukuran resource**: untuk trafik ringan (~10 req/s), 1 vCPU / 1 GB per layanan sudah cukup. Bila latensi pengiriman naik, tambahkan CPU di layanan `convoy` lebih dulu.

            ## Troubleshooting

            - **502 pada deploy pertama**: Convoy butuh ~15 detik untuk migrasi sebelum HTTP server siap. Refresh sebentar kemudian.
            - **Loop migrasi (retrying in 5s)**: PostgreSQL belum siap. Convoy akan retry otomatis hingga ~1 menit.
            - **Tidak melihat log delivery gagal**: cek tabel `event_deliveries` di PostgreSQL, atau buka Convoy UI → Project → Event Deliveries.

            ## Kredit

            - Sumber: [github.com/frain-dev/convoy](https://github.com/frain-dev/convoy) (2.800+ ⭐) · Elastic License 2.0
            - Website: [getconvoy.io](https://www.getconvoy.io)
    ja-JP:
        description: セキュアでスケーラブル、信頼性の高い Webhook 配信を実現するオープンソースのエンタープライズ Webhook ゲートウェイ。PostgreSQL と Redis を同梱。
        variables:
            - key: PUBLIC_DOMAIN
              type: STRING
              name: Convoy ドメイン
              description: Convoy UI / API の公開サブドメインのプレフィックス（例：「convoy」を入力すると convoy.zeabur.app になります）
        readme: |
            # Zeabur で Convoy をデプロイ

            **Convoy** は、高速・安全なオープンソースの Webhook ゲートウェイです。**送信 Webhook**（リトライ、レート制限、署名、配信ログ）と**受信 Webhook**（HMAC 検証、ソース管理、リプレイ）を管理します。このテンプレートは、Convoy をワンクリックで Zeabur 上に自前ホスティングし、必要な 2 つの依存サービス（永続化用の **PostgreSQL** とキュー用の **Redis**）を同時にデプロイします。

            > Convoy は [Frain Technologies](https://www.getconvoy.io) が開発し、[Elastic License 2.0](https://github.com/frain-dev/convoy/blob/main/LICENSE) で提供されています。このテンプレートはデプロイのレシピであり、あなた自身のインスタンスをホストし、データと API キーは完全にあなたの管理下にあります。

            ---

            ## このテンプレートで作成されるもの

            1 つのプロジェクトに 3 つのサービス：

            | サービス | イメージ | 役割 |
            |---|---|---|
            | `convoy` | `getconvoy/convoy:latest` | API、ダッシュボード、Webhook 配信ワーカー（単一バイナリ）。初回起動時に DB マイグレーションを自動実行。 |
            | `postgresql` | `postgres:18` | プロジェクト、エンドポイント、イベント、配信、試行履歴を保存 |
            | `redis` | `redis/redis-stack-server:latest` | ジョブキュー、レート制限カウンター、キャッシュ |

            Convoy は Zeabur のプライベートネットワーク経由で PostgreSQL と Redis に自動接続されます。手動設定は不要です。

            ## デプロイ手順

            1. このテンプレートの **Deploy** をクリックします。
            2. **Convoy ドメイン** のプレフィックスを選びます（テスト用途ならデフォルトで OK。後から Zeabur 管理画面でカスタムドメインも設定可能）。
            3. 3 つのサービスが起動するまで約 30 秒待ちます。Convoy は初回起動時に自動で DB マイグレーションを実行します。
            4. Zeabur が `convoy` サービスに表示する URL を開きます。

            ## 初回ログイン

            初回起動時、Convoy はデフォルトのスーパーユーザーを作成します。`convoy` サービスの**ランタイムログ**に次のように出力されます：

            ```
            Superuser created successfully:
              Username: superuser@default.com
              Password: default
            ```

            この情報でログインしたら、**すぐに**：

            1. 自分の組織とユーザーを作成する
            2. デフォルトの `superuser@default.com` を削除する
            3. 本番トラフィック用の API キーをローテーションする

            ## 次のステップ

            - **最初の Webhook 送信**：ダッシュボードで Project を作成 → Endpoint を追加 → Event を発行。Convoy が署名・配信し、結果を記録します。
            - **Webhook 受信**：Project 下で Source を作成すると、Convoy が `https://convoy.zeabur.app/ingest/<id>` 形式の URL を発行し、サードパーティに渡せます。
            - **API**：詳細は [getconvoy.io/docs/api-reference](https://www.getconvoy.io/docs/api-reference)。
            - **セルフホストドキュメント**：[getconvoy.io/docs](https://www.getconvoy.io/docs)。

            ## 設定可能な変数

            すべての設定は `convoy` サービスの **Variables** タブで調整できます。よく使うもの：

            | 変数 | 説明 |
            |---|---|
            | `CONVOY_HOST` | Convoy の公開 URL。Zeabur のドメインに既定設定済み。カスタムドメインを使う場合は更新してください。 |
            | `CONVOY_SIGNUP_ENABLED` | `true` で UI から新規ユーザー登録を許可。`false` でロックダウン。 |
            | `CONVOY_DB_MAX_OPEN_CONN` | PostgreSQL コネクションプール（デフォルト 100）。小規模プランでは下げてください。 |
            | `CONVOY_SMTP_*` | パスワードリセットや招待メールの SMTP 設定（任意）。 |

            すべての環境変数：[convoy.env.example](https://github.com/frain-dev/convoy/blob/main/convoy.env.example)。

            ## 運用

            - **DB バックアップ**：Zeabur は PostgreSQL を自動でスナップショットします。`postgresql` サービスの Backup タブから復元できます。
            - **アップグレード**：Convoy の新バージョンは `getconvoy/convoy:latest` に公開されます。`convoy` サービスを再起動するだけで新しいイメージを取得し、次回起動時にマイグレーションも自動適用されます。
            - **リソース**：軽い負荷（約 10 req/s）なら各サービス 1 vCPU / 1 GB で十分です。配信レイテンシが上がってきたら、まず `convoy` の CPU を増やしてください。

            ## トラブルシューティング

            - **初回デプロイで 502**：Convoy はマイグレーションで約 15 秒かかります。少し待ってから再アクセスしてください。
            - **マイグレーションがリトライ中（retrying in 5s）**：PostgreSQL がまだ起動中です。Convoy が自動で最大 1 分ほどリトライします。
            - **失敗した配信が見つからない**：PostgreSQL の `event_deliveries` テーブル、または Convoy UI の Project → Event Deliveries を確認してください。

            ## クレジット

            - ソース：[github.com/frain-dev/convoy](https://github.com/frain-dev/convoy)（2,800+ ⭐）· Elastic License 2.0
            - 公式サイト：[getconvoy.io](https://www.getconvoy.io)
    zh-CN:
        description: 开源企业级 Webhook 网关，安全、可扩展、可靠。已捆绑 PostgreSQL 与 Redis，一键部署。
        variables:
            - key: PUBLIC_DOMAIN
              type: STRING
              name: Convoy 域名
              description: Convoy UI 与 API 的公开子域名前缀（例如填写 "convoy" 会得到 convoy.zeabur.app）
        readme: |
            # 在 Zeabur 上部署 Convoy

            **Convoy** 是一款快速、安全的开源 Webhook 网关。它管理**外发 Webhook**（重试、限流、签名、投递日志）和**接收 Webhook**（HMAC 校验、来源管理、重放）。本模板会在 Zeabur 上以**一键自托管**方式部署 Convoy，并同时部署它需要的两个服务：**PostgreSQL**（持久化）和 **Redis**（队列）。

            > Convoy 由 [Frain Technologies](https://www.getconvoy.io) 开发，采用 [Elastic License 2.0](https://github.com/frain-dev/convoy/blob/main/LICENSE)。本模板只是部署配方 — 你自托管自己的实例，完全掌控数据和 API 密钥。

            ---

            ## 包含内容

            一个项目，三个服务：

            | 服务 | 镜像 | 用途 |
            |---|---|---|
            | `convoy` | `getconvoy/convoy:latest` | API、控制台、Webhook 投递 Worker（单二进制）。首次启动自动执行数据库迁移。 |
            | `postgresql` | `postgres:18` | 存储项目、端点、事件、投递、尝试记录 |
            | `redis` | `redis/redis-stack-server:latest` | 队列、限流计数、缓存 |

            Convoy 通过 Zeabur 私有网络自动连接 PostgreSQL 和 Redis，无需手动配置。

            ## 部署步骤

            1. 点击模板上的 **Deploy**。
            2. 选择 **Convoy 域名** 前缀（默认即可用于测试 — 之后可以在 Zeabur 控制台绑定自定义域名）。
            3. 等待约 30 秒让三个服务启动。Convoy 首次启动会自动执行数据库迁移。
            4. 打开 Zeabur 为 `convoy` 服务显示的链接。

            ## 首次登录

            首次启动时，Convoy 会自动创建默认超级用户。在 `convoy` 服务的**运行时日志**中可以看到：

            ```
            Superuser created successfully:
              Username: superuser@default.com
              Password: default
            ```

            用这组凭据登录后，**请立即**：

            1. 创建你自己的组织和用户。
            2. 删除默认的 `superuser@default.com`。
            3. 为正式流量轮换 API 密钥。

            ## 下一步

            - **发送第一个 Webhook**：在控制台创建 Project → 添加 Endpoint → 发布 Event。Convoy 会签名、投递并记录结果。
            - **接收 Webhook**：在 Project 下创建 Source，Convoy 会给你一个 `https://convoy.zeabur.app/ingest/<id>` 的地址提供给第三方。
            - **API**：完整参考见 [getconvoy.io/docs/api-reference](https://www.getconvoy.io/docs/api-reference)。
            - **自托管文档**：[getconvoy.io/docs](https://www.getconvoy.io/docs)。

            ## 可调参数

            所有 Convoy 设置可在 `convoy` 服务的 **Variables** 标签页调整。常用：

            | 变量 | 说明 |
            |---|---|
            | `CONVOY_HOST` | Convoy 的公开 URL。默认为 Zeabur 域名；绑定自定义域名后请更新。 |
            | `CONVOY_SIGNUP_ENABLED` | `true` 允许 UI 注册；`false` 锁定部署。 |
            | `CONVOY_DB_MAX_OPEN_CONN` | PostgreSQL 连接池大小（默认 100）。小方案请调低。 |
            | `CONVOY_SMTP_*` | 密码重置 / 邀请邮件的 SMTP 配置，可选。 |

            完整环境变量参考：[convoy.env.example](https://github.com/frain-dev/convoy/blob/main/convoy.env.example)。

            ## 运维

            - **数据库备份**：Zeabur 自动快照 PostgreSQL。可从 `postgresql` 服务的 Backup 标签页恢复。
            - **升级**：Convoy 新版本发布到 `getconvoy/convoy:latest`。重启 `convoy` 服务即可拉取新镜像，并在下次启动时自动应用迁移。
            - **资源**：轻量流量（约 10 req/s）下每服务 1 vCPU / 1 GB 足够。若投递延迟升高，优先增加 `convoy` 的 CPU。

            ## 故障排查

            - **首次部署返回 502**：Convoy 需要约 15 秒跑迁移后 HTTP 才会就绪，请稍后重试。
            - **迁移循环（retrying in 5s）**：PostgreSQL 尚未就绪。Convoy 会自动重试，最长约一分钟。
            - **找不到失败投递记录**：可查 PostgreSQL 的 `event_deliveries` 表，或从 Convoy UI 的 Project → Event Deliveries 查看。

            ## 致谢

            - 源码：[github.com/frain-dev/convoy](https://github.com/frain-dev/convoy)（2,800+ ⭐）· Elastic License 2.0
            - 官网：[getconvoy.io](https://www.getconvoy.io)
    zh-TW:
        description: 開源的企業級 Webhook 閘道，安全、可靠、可擴展。已整合 PostgreSQL 與 Redis，可一鍵部署。
        variables:
            - key: PUBLIC_DOMAIN
              type: STRING
              name: Convoy 網域
              description: Convoy UI 與 API 的公開子網域前綴（例如填入「convoy」會產生 convoy.zeabur.app）
        readme: |
            # 在 Zeabur 上部署 Convoy

            **Convoy** 是一套快速、安全的開源 Webhook 閘道。它負責**外送 Webhook**（重試、限流、簽章、投遞紀錄）與**接收 Webhook**（HMAC 驗證、來源管理、重播）。此模板會在 Zeabur 上以**一鍵自架**方式部署 Convoy，並一併佈署它所需的兩個依賴服務：**PostgreSQL**（持久化）與 **Redis**（佇列）。

            > Convoy 由 [Frain Technologies](https://www.getconvoy.io) 開發，採 [Elastic License 2.0](https://github.com/frain-dev/convoy/blob/main/LICENSE)。此模板僅為部署配方 — 你自架自己的執行個體，完全掌握自己的資料與 API 金鑰。

            ---

            ## 包含內容

            單一專案內三個服務：

            | 服務 | 映像 | 用途 |
            |---|---|---|
            | `convoy` | `getconvoy/convoy:latest` | API、儀表板、Webhook 投遞 Worker（單一執行檔）。首次啟動會自動套用資料庫遷移。 |
            | `postgresql` | `postgres:18` | 儲存專案、端點、事件、投遞、嘗試紀錄 |
            | `redis` | `redis/redis-stack-server:latest` | 佇列、限流計數、快取 |

            Convoy 透過 Zeabur 私有網路自動接上 PostgreSQL 與 Redis，無需手動設定。

            ## 部署步驟

            1. 點擊此模板的 **Deploy**。
            2. 選擇 **Convoy 網域** 前綴（預設可用於測試 — 可日後在 Zeabur 後台綁定自訂網域）。
            3. 等待約 30 秒讓三個服務啟動。Convoy 會在首次啟動時自動執行資料庫遷移。
            4. 開啟 Zeabur 為 `convoy` 服務顯示的網址。

            ## 首次登入

            首次啟動時，Convoy 會建立預設超級使用者。在 `convoy` 服務的**執行時 Log** 中可以看到：

            ```
            Superuser created successfully:
              Username: superuser@default.com
              Password: default
            ```

            以此帳密登入後，**請立刻**：

            1. 建立你自己的組織與使用者。
            2. 刪除預設的 `superuser@default.com` 帳號。
            3. 為正式流量輪替 API 金鑰。

            ## 下一步

            - **送出第一個 Webhook**：在儀表板建立 Project → 新增 Endpoint → 發佈 Event。Convoy 會簽章、投遞並記錄結果。
            - **接收 Webhook**：在 Project 下設定 Source，Convoy 會給你一個如 `https://convoy.zeabur.app/ingest/<id>` 的網址提供給第三方。
            - **API**：完整參考請見 [getconvoy.io/docs/api-reference](https://www.getconvoy.io/docs/api-reference)。
            - **自架文件**：[getconvoy.io/docs](https://www.getconvoy.io/docs)。

            ## 可調參數

            所有 Convoy 設定可在 `convoy` 服務的 **Variables** 分頁調整。常用：

            | 變數 | 說明 |
            |---|---|
            | `CONVOY_HOST` | Convoy 對外網址。已預設為 Zeabur 網域；綁自訂網域後請更新。 |
            | `CONVOY_SIGNUP_ENABLED` | `true` 允許 UI 新註冊；`false` 鎖定部署。 |
            | `CONVOY_DB_MAX_OPEN_CONN` | PostgreSQL 連線池大小（預設 100）。小方案請調低。 |
            | `CONVOY_SMTP_*` | 密碼重設 / 邀請信用的 SMTP 設定，選用。 |

            完整環境變數參考：[convoy.env.example](https://github.com/frain-dev/convoy/blob/main/convoy.env.example)。

            ## 維運

            - **資料庫備份**：Zeabur 會自動快照 PostgreSQL。可從 `postgresql` 服務的 Backup 分頁還原。
            - **升級**：Convoy 新版本會發佈至 `getconvoy/convoy:latest`。重新啟動 `convoy` 服務即會抓取新映像，並在下次啟動時自動套用遷移。
            - **資源**：輕量流量（約 10 req/s）下，每服務 1 vCPU / 1 GB 即可。若投遞延遲升高，優先提升 `convoy` 的 CPU。

            ## 疑難排解

            - **首次部署回 502**：Convoy 需約 15 秒跑遷移後 HTTP 才會就緒，請稍候再試。
            - **遷移迴圈（retrying in 5s）**：PostgreSQL 還沒就緒。Convoy 會自動重試，最多約一分鐘。
            - **找不到失敗投遞紀錄**：可查 PostgreSQL 的 `event_deliveries` 表，或從 Convoy UI 的 Project → Event Deliveries 檢視。

            ## 致謝

            - 原始碼：[github.com/frain-dev/convoy](https://github.com/frain-dev/convoy)（2,800+ ⭐）· Elastic License 2.0
            - 官方網站：[getconvoy.io](https://www.getconvoy.io)
