# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: Bearlytics
spec:
    description: Analytics service for your website
    icon: https://cdn.zeabur.com/templates/icon/bearlytics.png
    variables:
        - key: PUBLIC_DOMAIN
          type: DOMAIN
          name: Public Domain
          description: The public domain to access your Bearlytics.
        - key: CSRF_TRUSTED_ORIGINS
          type: STRING
          name: CSRF Trusted Origins
          description: URLs that are allowed to make requests to the API, for example https://my-website.zeabur.app
    tags:
        - Analytics
        - Tool
    readme: |
        # Bearlytics

        This is a one-click deployment template of the latest version of Bearlytics. Bearlytics is exactly what it says on the tin - a straightforward web analytics tool that helps you understand your website traffic without selling your soul to the tracking gods. No cookies, no PII problems, just the basics:

        - Page views
        - Referrers
        - Country
        - Device type
        - Browser

        For details, see: <https://github.com/HermanMartinus/bearlytics>
    services:
        - name: bearlytics
          icon: https://cdn.zeabur.com/templates/icon/bearlytics.png
          template: PREBUILT
          spec:
            source:
                image: ghcr.io/hermanmartinus/bearlytics:latest
            ports:
                - id: web
                  port: 8000
                  type: HTTP
            volumes:
                - id: data
                  dir: /app/data
            env:
                CSRF_TRUSTED_ORIGINS: {}
                DB_PATH:
                    default: /app/data/analytics.db
                DEBUG:
                    default: "False"
                GID:
                    default: "1000"
                SALT_SECRET:
                    default: ${PASSWORD}
                SECRET_KEY:
                    default: ${PASSWORD}
                UID:
                    default: "1000"
          domainKey: PUBLIC_DOMAIN
