# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: AxonHub
spec:
    description: All-in-one AI development platform. Use any SDK. Access any model. Zero code changes.
    variables:
        - key: PUBLIC_DOMAIN
          type: DOMAIN
          name: Domain
          description: Domain for AxonHub (e.g. "axonhub" -> axonhub.zeabur.app)
    tags:
        - AI
        - Tool
    readme: ""
    services:
        - name: PostgreSQL
          icon: https://cdn.zeabur.com/marketplace/postgresql.svg
          template: PREBUILT
          spec:
            id: postgresql
            source:
                image: postgres:18
            ports:
                - id: database
                  port: 5432
                  type: TCP
            volumes:
                - id: data
                  dir: /var/lib/postgresql
            env:
                POSTGRES_CONNECTION_STRING:
                    default: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
                    expose: true
                POSTGRES_DB:
                    default: axonhub
                POSTGRES_HOST:
                    default: ${CONTAINER_HOSTNAME}
                    expose: true
                POSTGRES_PASSWORD:
                    default: ${PASSWORD}
                    expose: true
                POSTGRES_PORT:
                    default: ${DATABASE_PORT}
                    expose: true
                POSTGRES_USER:
                    default: axonhub
        - name: AxonHub
          dependencies:
            - PostgreSQL
          template: PREBUILT
          spec:
            id: axonhub
            source:
                image: looplj/axonhub:latest
            ports:
                - id: web
                  port: 8090
                  type: HTTP
            env:
                AXONHUB_DB_DIALECT:
                    default: postgres
                AXONHUB_DB_DSN:
                    default: ${POSTGRES_CONNECTION_STRING}?sslmode=disable
                AXONHUB_SERVER_PORT:
                    default: "8090"
            healthCheck:
                type: HTTP
                port: web
                http:
                    path: /health
          domainKey: PUBLIC_DOMAIN
