paperless-gpt initial
This commit is contained in:
39
paperless-gpt/cm.yaml
Normal file
39
paperless-gpt/cm.yaml
Normal file
@@ -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"
|
||||||
64
paperless-gpt/deploy.yaml
Normal file
64
paperless-gpt/deploy.yaml
Normal file
@@ -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: {}
|
||||||
10
paperless-gpt/kustomization.yaml
Normal file
10
paperless-gpt/kustomization.yaml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- cm.yaml
|
||||||
|
- deploy.yaml
|
||||||
|
- svc.yaml
|
||||||
|
- pv.yaml
|
||||||
|
- pvc.yaml
|
||||||
16
paperless-gpt/pv.yaml
Normal file
16
paperless-gpt/pv.yaml
Normal file
@@ -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)
|
||||||
12
paperless-gpt/pvc.yaml
Normal file
12
paperless-gpt/pvc.yaml
Normal file
@@ -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
|
||||||
13
paperless-gpt/svc.yaml
Normal file
13
paperless-gpt/svc.yaml
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user