# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: Dozzle
spec:
    description: Real-time log viewer for Docker containers with authentication
    icon: https://raw.githubusercontent.com/amir20/dozzle/master/logo.png
    tags:
        - Tool
        - Monitoring
        - Docker
    readme: |
        # Dozzle - Real-time Docker Log Viewer

        Dozzle is a lightweight, web-based Docker log viewer that provides real-time monitoring of your container logs.

        ## Features
        - Real-time log streaming
        - Multi-container support
        - Authentication support
        - Dark/Light theme
        - Responsive web interface

        ## Configuration

        This template provides authentication support through environment variables:

        - `DOZZLE_USERNAME`: Admin username (default: admin)
        - `DOZZLE_EMAIL`: Admin email address (default: admin@example.com)
        - `DOZZLE_NAME`: Admin display name (default: Administrator)
        - `DOZZLE_PASSWORD_HASH`: Bcrypt hashed password (see instructions below for generating)
        - `DOZZLE_AUTH_TTL`: Authentication cookie lifetime in hours (default: 8)

        ## Access

        After deployment, access Dozzle through the provided URL and log in with your configured credentials.
    services:
        - name: dozzle
          icon: https://raw.githubusercontent.com/amir20/dozzle/master/logo.png
          template: PREBUILT
          spec:
            id: dozzle
            source:
                image: amir20/dozzle:latest
            ports:
                - id: web
                  port: 8080
                  type: HTTP
            volumes:
                - id: docker-sock
                  dir: /var/run/docker.sock
            env:
                DOZZLE_AUTH_PROVIDER:
                    default: simple
                    expose: false
                DOZZLE_AUTH_TTL:
                    default: "8"
                    expose: true
                DOZZLE_EMAIL:
                    default: admin@example.com
                    expose: true
                DOZZLE_FILTER:
                    expose: true
                DOZZLE_HOSTNAME:
                    expose: true
                DOZZLE_LEVEL:
                    default: info
                    expose: true
                DOZZLE_NAME:
                    default: Administrator
                    expose: true
                DOZZLE_PASSWORD_HASH:
                    expose: true
                DOZZLE_TAILSIZE:
                    default: "300"
                    expose: true
                DOZZLE_USERNAME:
                    default: admin
                    expose: true
            configs:
                - path: /data/users.yml
                  template: |
                    users:
                      ${DOZZLE_USERNAME}:
                        name: ${DOZZLE_NAME}
                        email: ${DOZZLE_EMAIL}
                        password: ${DOZZLE_PASSWORD_HASH}
                  permission: null
                  envsubst: null
