paperless restructure

This commit is contained in:
Steffen Illium 2024-05-22 22:04:46 +02:00
parent 1ede3f6ae7
commit fb28ac2a57
7 changed files with 114 additions and 11 deletions

View File

@ -2,14 +2,14 @@ apiVersion: v1
kind: Service
metadata:
labels:
app: paperless-service
name: paperless-service
app: paperless
name: paperless
spec:
ports:
- name: http
port: 80
targetPort: http
selector:
app: paperless-webserver
app: paperless
status:
loadBalancer: {}

View File

@ -0,0 +1,89 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: paperless
name: paperless
spec:
replicas: 1
selector:
matchLabels:
app: paperless
strategy:
type: Recreate
template:
metadata:
labels:
app: paperless
spec:
containers:
- image: ghcr.io/paperless-ngx/paperless-ngx:latest
name: paperless
ports:
- name: http
containerPort: 8000
protocol: TCP
resources:
limits: {}
volumeMounts:
- mountPath: /usr/src/paperless/data
name: paperless-pvc
subPath: 716a7a59-c361-48a1-ae89-f935919f7e59/app
- mountPath: /usr/src/paperless/media
name: paperless-media
- mountPath: /usr/src/paperless/consume
name: paperless-pvc
subPath: 716a7a59-c361-48a1-ae89-f935919f7e59/consume
env:
- name: DEBUG
value: "false"
- name: PAPERLESS_ALLOWED_HOSTS
value: steffenillium.de,localhost
- name: PAPERLESS_CONSUMER_POLLING
value: "20"
- name: PAPERLESS_CONSUMER_RECURSIVE
value: "true"
- name: PAPERLESS_CORS_ALLOWED_HOSTS
value: http://localhost:8000
- name: PAPERLESS_DBHOST
value: localhost
- name: PAPERLESS_ENABLE_HTTP_REMOTE_USER
value: "true"
- name: PAPERLESS_OCR_LANGUAGE
value: deu
- name: PAPERLESS_OCR_LANGUAGES
value: eng deu
- name: PAPERLESS_OCR_ROTATE_PAGES
value: "true"
- name: PAPERLESS_OCR_ROTATE_PAGES_THRESHOLD
value: "10"
- name: PAPERLESS_REDIS
value: redis://localhost:6379
- name: PAPERLESS_TIME_ZONE
value: Europe/Berlin
- name: PAPERLESS_URL
value: https://documents.steffenillium.de
- name: PAPERLESS_SECRET_KEY
valueFrom:
secretKeyRef:
name: paperless-secret
key: PAPERLESS_SECRET_KEY
- image: docker.io/library/redis:7
name: paperless-broker
ports:
- containerPort: 6379
protocol: TCP
resources:
limits:
cpu: "0.1"
memory: "250M"
restartPolicy: Always
volumes:
- name: paperless-pvc
persistentVolumeClaim:
claimName: paperless-pvc
- name: paperless-media
nfs:
server: 192.168.178.4
path: /mnt/storage/service/paperless/media
readOnly: false

View File

@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: database
name: database
spec:
ports:
- name: http
port: 5432
targetPort: http
selector:
app: database
status:
loadBalancer: {}

View File

@ -19,10 +19,7 @@ spec:
containers:
- image: docker.io/library/postgres:13
name: paperless-db
resources:
limits:
cpu: "0.2"
memory: "1G"
resources: {}
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: paperless-pvc

View File

@ -5,10 +5,12 @@ namespace: paperless
resources:
- base/pvc.yaml
- base/paperless-secret-sealed.yaml
- base/secret-sealed.yaml
- base/ingress.yaml
- base/paperless-service.yaml
- base/deployment.yaml
- base/app-service.yaml
- base/database-service.yaml
- base/app.yaml
- base/database.yaml
- base/namespace.yaml
components:

View File

@ -5,7 +5,7 @@ metadata:
namespace: traefik
spec:
minReadySeconds: 0
replicas: 1
replicas: 3
selector:
matchLabels:
app: traefik