From eff33014542387c0c120d4353817d93a10f46bf0 Mon Sep 17 00:00:00 2001 From: Philip Haupt <“der.mad.mob@gmail.com”> Date: Fri, 13 Feb 2026 20:48:06 +0100 Subject: [PATCH] paperless-gpt initial --- paperless-gpt/cm.yaml | 39 +++++++++++++++++++ paperless-gpt/deploy.yaml | 64 ++++++++++++++++++++++++++++++++ paperless-gpt/kustomization.yaml | 10 +++++ paperless-gpt/pv.yaml | 16 ++++++++ paperless-gpt/pvc.yaml | 12 ++++++ paperless-gpt/svc.yaml | 13 +++++++ 6 files changed, 154 insertions(+) create mode 100644 paperless-gpt/cm.yaml create mode 100644 paperless-gpt/deploy.yaml create mode 100644 paperless-gpt/kustomization.yaml create mode 100644 paperless-gpt/pv.yaml create mode 100644 paperless-gpt/pvc.yaml create mode 100644 paperless-gpt/svc.yaml diff --git a/paperless-gpt/cm.yaml b/paperless-gpt/cm.yaml new file mode 100644 index 0000000..4741cbf --- /dev/null +++ b/paperless-gpt/cm.yaml @@ -0,0 +1,39 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: paperless-gpt + namespace: paperless-gpt +data: + PAPERLESS_BASE_URL: "http://paperless.paperless.svc.cluster.local:8000" + PAPERLESS_PUBLIC_URL: "https://paperless.home" + + MANUAL_TAG: "paperless-gpt" + AUTO_TAG: "paperless-gpt-auto" + + # LLM (OpenAI) + LLM_PROVIDER: "ollama" + LLM_MODEL: "llama3.1:8b" + + # OCR (LLM) + OCR_PROVIDER: "llm" + VISION_LLM_PROVIDER: "ollama" + VISION_LLM_MODEL: "minicpm-v" + OLLAMA_HOST: "http://ollama.home:11434" + + OCR_PROCESS_MODE: "image" + PDF_SKIP_EXISTING_OCR: "false" + + CREATE_LOCAL_HOCR: "false" + LOCAL_HOCR_PATH: "/app/hocr" + CREATE_LOCAL_PDF: "false" + LOCAL_PDF_PATH: "/app/pdf" + + PDF_UPLOAD: "false" + PDF_REPLACE: "false" + PDF_COPY_METADATA: "true" + PDF_OCR_TAGGING: "true" + PDF_OCR_COMPLETE_TAG: "paperless-gpt-ocr-complete" + + AUTO_OCR_TAG: "paperless-gpt-ocr-auto" + OCR_LIMIT_PAGES: "5" + LOG_LEVEL: "info" \ No newline at end of file diff --git a/paperless-gpt/deploy.yaml b/paperless-gpt/deploy.yaml new file mode 100644 index 0000000..806f2ee --- /dev/null +++ b/paperless-gpt/deploy.yaml @@ -0,0 +1,64 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: paperless-gpt + namespace: paperless-gpt +spec: + replicas: 1 + selector: + matchLabels: + app: paperless-gpt + template: + metadata: + labels: + app: paperless-gpt + spec: + containers: + - name: paperless-gpt + image: icereed/paperless-gpt:0.24.0 + imagePullPolicy: IfNotPresent + ports: + - name: http + containerPort: 8080 + + envFrom: + - configMapRef: + name: paperless-gpt + + env: + - name: PAPERLESS_API_TOKEN + valueFrom: + secretKeyRef: + name: paperless-gpt + key: PAPERLESS_API_TOKEN + - name: OPENAI_API_KEY + valueFrom: + secretKeyRef: + name: paperless-gpt + key: OPENAI_API_KEY + + volumeMounts: + - name: prompts + mountPath: /app/prompts + + # Optional: nur sinnvoll, wenn CREATE_LOCAL_HOCR/CREATE_LOCAL_PDF true sind + - name: hocr + mountPath: /app/hocr + - name: pdf + mountPath: /app/pdf + + readinessProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 10 + periodSeconds: 10 + + volumes: + - name: prompts + persistentVolumeClaim: + claimName: nfs-paperless-gpt-prompts + - name: hocr + emptyDir: {} + - name: pdf + emptyDir: {} \ No newline at end of file diff --git a/paperless-gpt/kustomization.yaml b/paperless-gpt/kustomization.yaml new file mode 100644 index 0000000..b1ff62b --- /dev/null +++ b/paperless-gpt/kustomization.yaml @@ -0,0 +1,10 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - cm.yaml + - deploy.yaml + - svc.yaml + - pv.yaml + - pvc.yaml diff --git a/paperless-gpt/pv.yaml b/paperless-gpt/pv.yaml new file mode 100644 index 0000000..0e90014 --- /dev/null +++ b/paperless-gpt/pv.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: nfs-paperless-gpt-prompts +spec: + storageClassName: nfs-storage + capacity: + storage: 1Gi # Beachte: NFS ist dynamisch, die Größe ist nur ein Label + accessModes: + - ReadWriteMany + persistentVolumeReclaimPolicy: Retain + nfs: + path: /mnt/volume1/container/docker/paperless-gpt/prompts # Der Pfad der NFS-Freigabe auf der NAS + server: 192.168.10.1 # Die IP-Adresse deiner NAS + mountOptions: + - nfsvers=4 # Passe ggf. an (nfsvers=3 falls nötig) \ No newline at end of file diff --git a/paperless-gpt/pvc.yaml b/paperless-gpt/pvc.yaml new file mode 100644 index 0000000..f40fb2f --- /dev/null +++ b/paperless-gpt/pvc.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: nfs-paperless-gpt-prompts +spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: 1Gi + volumeName: nfs-paperless-gpt-prompts + storageClassName: nfs-storage \ No newline at end of file diff --git a/paperless-gpt/svc.yaml b/paperless-gpt/svc.yaml new file mode 100644 index 0000000..3325b05 --- /dev/null +++ b/paperless-gpt/svc.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: paperless-gpt + namespace: paperless-gpt +spec: + selector: + app: paperless-gpt + ports: + - name: http + port: 8080 + targetPort: 8080 + type: ClusterIP \ No newline at end of file