# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: Karakeep
spec:
    description: A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search.
    icon: https://avatars.githubusercontent.com/u/170265186
    variables:
        - key: OPENAI_API_KEY
          type: STRING
          name: OpenAI API Key
          description: Your OpenAI API Key, required for OpenAI models like GPT-4.
        - key: OPENAI_BASE_URL
          type: STRING
          name: OpenAI Base URL
          description: Your OpenAI Base URL, required for OpenAI models like GPT-4.
    readme: "## What is Hoarder\n\nA self-hostable bookmark-everything app with a touch of AI for the data hoarders out there.\n\n## Features\n\n- \U0001F517 Bookmark links, take simple notes and store images and pdfs.\n- ⬇️ Automatic fetching for link titles, descriptions and images.\n- \U0001F4CB Sort your bookmarks into lists.\n- \U0001F50E Full text search of all the content stored.\n- ✨ AI-based (aka chatgpt) automatic tagging. With supports for local models using ollama!\n- \U0001F516 Chrome plugin and Firefox addon for quick bookmarking.\n- \U0001F4F1 An iOS app, and an Android app.\n- \U0001F5C4️ Full page archival (using monolith) to protect against link rot.\n- ☑️ Bulk actions support.\n- \U0001F510 SSO support.\n- \U0001F319 Dark mode support.\n- \U0001F4BE Self-hosting first.\n"
    services:
        - name: meilisearch
          icon: https://www.meilisearch.com/favicon.svg
          template: PREBUILT
          spec:
            source:
                image: getmeili/meilisearch:v1.13.3
            ports:
                - id: web
                  port: 7700
                  type: HTTP
            volumes:
                - id: data
                  dir: /meili_data
            instructions:
                - title: Meilisearch Master Key
                  content: ${MEILI_MASTER_KEY}
            env:
                MEILI_MASTER_KEY:
                    default: ${PASSWORD}
                    expose: true
                MEILI_NO_ANALYTICS:
                    default: "true"
        - name: chrome
          icon: https://upload.wikimedia.org/wikipedia/commons/thumb/e/e1/Google_Chrome_icon_%28February_2022%29.svg/128px-Google_Chrome_icon_%28February_2022%29.svg.png
          template: PREBUILT
          spec:
            source:
                image: gcr.io/zenika-hub/alpine-chrome:123
                args:
                    - --no-sandbox
                    - --disable-gpu
                    - --disable-dev-shm-usage
                    - --remote-debugging-address=0.0.0.0
                    - --remote-debugging-port=9222
                    - --hide-scrollbars
            ports:
                - id: web
                  port: 9222
                  type: HTTP
        - name: web
          icon: https://avatars.githubusercontent.com/u/170265186
          template: PREBUILT
          spec:
            source:
                image: ghcr.io/karakeep-app/karakeep:release
            ports:
                - id: web
                  port: 3000
                  type: HTTP
            volumes:
                - id: data
                  dir: /data
            env:
                BROWSER_WEB_URL:
                    default: http://chrome:9222
                DATA_DIR:
                    default: /data
                MEILI_ADDR:
                    default: http://meilisearch:7700
                NEXTAUTH_SECRET:
                    default: ${PASSWORD}
                NEXTAUTH_URL:
                    default: ${ZEABUR_WEB_URL}
