# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: ntfy
spec:
    description: Push notifications made easy
    icon: https://cdn.zeabur.com/templates/icon/ntfy.png
    variables:
        - key: PUBLIC_DOMAIN
          type: DOMAIN
          name: Ntfy Domain
          description: The domain where ntfy will be hosted.
    readme: |
        # ntfy

        ntfy (pronounced `notify`) is a simple HTTP-based pub-sub notification service. It allows you to send notifications to your phone or desktop via scripts from any computer, and/or using a REST API. It's infinitely flexible, and 100% free software.

        Homepage → <https://ntfy.sh>

        ## Usage

        This template can be deployed in one click.

        Note that the default configuration **does not include any authentication**. See <https://docs.ntfy.sh/config/#access-control> for more information on how to secure your ntfy instance.
    services:
        - name: ntfy
          icon: https://cdn.zeabur.com/templates/icon/ntfy.png
          template: PREBUILT_V2
          spec:
            source:
                image: binwiederhier/ntfy:latest
                args:
                    - serve
            ports:
                - id: web
                  port: 80
                  type: HTTP
            volumes:
                - id: data
                  dir: /var/lib/ntfy
                - id: cache
                  dir: /var/cache/ntfy
                - id: config
                  dir: /etc/ntfy
            env:
                NTFY_ATTACHMENT_CACHE_DIR:
                    default: /var/lib/ntfy/attachments
                NTFY_BASE_URL:
                    default: https://${ZEABUR_WEB_DOMAIN}
                    expose: false
                NTFY_BEHIND_PROXY:
                    default: "true"
                    expose: false
                NTFY_CACHE_FILE:
                    default: /var/cache/ntfy/cache.db
                TZ:
                    default: Asia/Taipei
          domainKey: PUBLIC_DOMAIN
