# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: SurrealDB
spec:
    description: An end-to-end cloud-native database designed for modern applications.
    coverImage: https://repository-images.githubusercontent.com/436658287/48975688-cf92-4b36-9fe1-fbe0a492a74b
    icon: https://cdn.zeabur.com/database/surreal.svg
    tags:
        - Database
    readme: "SurrealDB is an end-to-end cloud-native database designed for modern applications, including web, mobile, serverless, Jamstack, backend, and traditional applications. \n\nWith SurrealDB, you can simplify your database and API infrastructure, reduce development time, and build secure, performant apps quickly and cost-effectively.\n\n## Key features of SurrealDB include:\n\nReduces development time: SurrealDB simplifies your database and API stack by removing the need for most server-side components, allowing you to build secure, performant apps faster and cheaper.\n\nReal-time collaborative API backend service: SurrealDB functions as both a database and an API backend service, enabling real-time collaboration.\n\nSupport for multiple querying languages: SurrealDB supports SQL querying from client devices, GraphQL, ACID transactions, WebSocket connections, structured and unstructured data, graph querying, full-text indexing, and geospatial querying.\n\nGranular access control: SurrealDB provides row-level permissions-based access control, giving you the ability to manage data access with precision.\nView the features, the latest releases, and documentation."
    services:
        - name: surrealdb
          icon: https://cdn.zeabur.com/database/surreal.svg
          template: PREBUILT
          spec:
            id: surrealdb
            source:
                image: surrealdb/surrealdb:v2
                args:
                    - start
                    - surrealkv://data/srdb.db
            ports:
                - id: web
                  port: 8000
                  type: HTTP
            volumes:
                - id: data
                  dir: /data
            instructions:
                - title: Go to SurrealDB
                  content: ${ZEABUR_WEB_URL}
                - title: Username
                  content: ${SURREAL_USERNAME}
                - title: Password
                  content: ${SURREAL_PASSWORD}
            env:
                SURREAL_PASS:
                    default: ${PASSWORD}
                SURREAL_PASSWORD:
                    default: ${SURREAL_PASS}
                    expose: true
                SURREAL_USER:
                    default: root
                SURREAL_USERNAME:
                    default: ${SURREAL_USER}
                    expose: true
