# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: Haven
spec:
    description: Self-hosted private chat — your server, your rules. No cloud. No tracking. Free forever.
    icon: https://raw.githubusercontent.com/ancsemi/Haven/main/Haven-Desktop/assets/icon.png
    variables:
        - key: HAVEN_DOMAIN
          type: DOMAIN
          name: Domain
          description: What domain do you want for your Haven server?
    tags:
        - Chat
        - Self-hosted
        - Communication
    readme: |-
        # Haven — Private Chat

        Self-hosted Discord alternative. Run it on your own infrastructure.
        Register with username `admin` to become the server owner.

        **Data persists** in the `/data` volume (database, uploads, certs, config).
    services:
        - name: Haven
          template: PREBUILT
          spec:
            id: haven
            source:
                image: ghcr.io/ancsemi/haven:latest
            ports:
                - id: web
                  port: 3000
                  type: HTTP
            volumes:
                - id: data
                  dir: /data
            env:
                FORCE_HTTP:
                    default: "true"
                HAVEN_DATA_DIR:
                    default: /data
                HOST:
                    default: 0.0.0.0
                NODE_ENV:
                    default: production
                PORT:
                    default: "3000"
          domainKey: HAVEN_DOMAIN
