# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: KnowledgeBase
spec:
    description: Exported from project 6a155a4ef14c612a409a3a28
    readme: ""
    services:
        - name: pgvectorpgvectorpg16
          icon: https://cdn.zeabur.com/prebuilt.svg
          template: PREBUILT_V2
          spec:
            id: pgvectorpgvectorpg16
            source:
                image: pgvector/pgvector:pg16
            ports:
                - id: port-5432
                  port: 5432
                  type: TCP
            volumes:
                - id: pgdata
                  dir: /var/lib/postgresql/data
            env:
                POSTGRES_DB:
                    default: ragdb
                    expose: false
                POSTGRES_PASSWORD:
                    default: ragpassword
                    expose: false
                POSTGRES_USER:
                    default: raguser
                    expose: false
            configs: []
            portForwarding:
                enabled: true
        - name: rag-service
          icon: https://cdn.zeabur.com/prebuilt.svg
          template: PREBUILT_V2
          spec:
            id: rag-service
            source:
                image: ghcr.io/juns0211/rag-service:latest
            ports:
                - id: port-8080
                  port: 8080
                  type: HTTP
            env:
                DB_HOST:
                    default: pgvectorpgvectorpg16.zeabur.internal
                    expose: false
                DB_PORT:
                    default: "5432"
                    expose: false
                EMBEDDINGS_PROVIDER:
                    default: external
                    expose: false
                JWT_SECRET:
                    default: 669667f0b2e4a0abc5ea39af8729b793ff5c7c8de052b24f5a63444cc2474f7b
                    expose: false
                POSTGRES_DB:
                    default: ragdb
                    expose: false
                POSTGRES_PASSWORD:
                    default: ragpassword
                    expose: false
                POSTGRES_USER:
                    default: raguser
                    expose: false
                RAG_PORT:
                    default: "8080"
                    expose: false
            configs: []
            portForwarding:
                enabled: false
        - name: ai-knowledge
          icon: https://cdn.zeabur.com/prebuilt.svg
          template: PREBUILT_V2
          spec:
            id: ai-knowledge
            source:
                image: ghcr.io/juns0211/ai-knowledge:latest
            ports:
                - id: port-8000
                  port: 8000
                  type: HTTP
            volumes:
                - id: sqlitedata
                  dir: /data
            env:
                KB_API_KEY:
                    default: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImFpX2tub3dsZWRnZSIsImV4cCI6MzM1MjMyNzgzNn0.FxJ0oSayjQQM-RCtXGAy41j096rzWcQzv90diXuGbb0
                    expose: false
                KB_API_URL:
                    default: http://rag-service.zeabur.internal:8080
                    expose: false
                SECRET_KEY:
                    default: change-me-in-production
                    expose: false
            configs: []
            portForwarding:
                enabled: false
