diff --git a/README.org b/README.org index 33acfca..21d0ac0 100644 --- a/README.org +++ b/README.org @@ -50,6 +50,8 @@ Below you'll find an overview of the charts and an intro to get you started. 🚧 [[charts/attic][Attic]]: Nix Binary Cache server that reduces the time to compile and distribute builds ([[https://discourse.nixos.org/t/introducing-attic-a-self-hostable-nix-binary-cache-server/24343][intro post]]) +🚧 [[charts/paperless-ngx][paperless-ngx]]: Document management system that transforms your physical documents into a searchable online archive. + 🚧 [[charts/nfty-sh][nfty.sh]]: A push notification server for clients and phones. 🚧 [[charts/ollama-web][OLLAMA Web]]: User-friendly WebUI for LLMs (Formerly Ollama WebUI). A simplified chart of the original and wip, but it works. diff --git a/charts/paperless-ngx/Chart.yaml b/charts/paperless-ngx/Chart.yaml new file mode 100644 index 0000000..32e0956 --- /dev/null +++ b/charts/paperless-ngx/Chart.yaml @@ -0,0 +1,19 @@ +apiVersion: v2 +name: paperless-ngx +description: | + document management system that transforms your physical documents into a searchable online archive +appVersion: v2.7.0 +type: application +version: 0.1.0 +maintainers: +- name: Tommy Skaug + email: tommy@skaug.me +icon: +keywords: +- documents +- cms +- email +- server +sources: +- https://github.com/paperless-ngx/paperless-ngx +- https://docs.paperless-ngx.com/ diff --git a/charts/paperless-ngx/templates/_helpers.tpl b/charts/paperless-ngx/templates/_helpers.tpl new file mode 100644 index 0000000..62cdf95 --- /dev/null +++ b/charts/paperless-ngx/templates/_helpers.tpl @@ -0,0 +1,30 @@ +# Define a template for the chart's full name. +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "paperless-ngx.fullname" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end }} + +# Define a template for standard labels. +{{/* +Common labels +*/}} +{{- define "paperless-ngx.labels" -}} +helm.sh/chart: {{ include "paperless-ngx.chart" . }} +app.kubernetes.io/name: {{ include "paperless-ngx.fullname" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/version: {{ .Chart.Version | quote }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +# Define a template for the chart name and version. +{{/* +Generate basic labels +*/}} +{{- define "paperless-ngx.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" -}} +{{- end }} + +# Optionally, add more helper templates as needed. diff --git a/charts/paperless-ngx/templates/deployment-server.yaml b/charts/paperless-ngx/templates/deployment-server.yaml new file mode 100644 index 0000000..32bd441 --- /dev/null +++ b/charts/paperless-ngx/templates/deployment-server.yaml @@ -0,0 +1,48 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "paperless-ngx.fullname" . }} + labels: + {{- include "paperless-ngx.labels" . | nindent 4 }} + app.kubernetes.io/component: {{ include "paperless-ngx.fullname" . }}-server + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/component: {{ include "paperless-ngx.fullname" . }}-server + template: + metadata: + labels: + app.kubernetes.io/component: {{ include "paperless-ngx.fullname" . }}-server + spec: + serviceAccountName: {{ include "paperless-ngx.fullname" . }} + containers: + - name: {{ include "paperless-ngx.fullname" . }}-server + image: {{ .Values.image.repository }}:{{ .Values.image.tag }} + env: + - name: PAPERLESS_URL + value: {{ .Values.config.externalUrl }} + - name: PAPERLESS_TIME_ZONE + value: {{ .Values.config.timezone }} + - name: PAPERLESS_OCR_LANGUAGE + value: {{ .Values.config.ocrLanguage }} + - name: PAPERLESS_OCR_LANGUAGES + value: {{ .Values.config.textRecognitionLanguates }} + - name: PAPERLESS_FORCE_SCRIPT_NAME + value: /PATHPREFIX + - name: PAPERLESS_STATIC_URL + value: /PATHPREFIX/static/ + resources: + limits: + memory: "128Mi" + cpu: "500m" + ports: + - containerPort: 80 + name: http + volumeMounts: + - name: {{ include "paperless-ngx.fullname" . }}-server + mountPath: "/usr/src/paperless" + readOnly: false + volumes: + - name: {{ include "paperless-ngx.fullname" . }}-server + persistentVolumeClaim: + claimName: {{ .Values.persistence.existingClaim }} \ No newline at end of file diff --git a/charts/paperless-ngx/templates/service-server.yaml b/charts/paperless-ngx/templates/service-server.yaml new file mode 100644 index 0000000..ab37b9f --- /dev/null +++ b/charts/paperless-ngx/templates/service-server.yaml @@ -0,0 +1,14 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ include "paperless-ngx.fullname" . }}-server + labels: + {{- include "paperless-ngx.labels" . | nindent 4 }} + app.kubernetes.io/component: {{ include "paperless-ngx.fullname" . }}-server +spec: + selector: + app: {{ include "paperless-ngx.fullname" . }}-server + ports: + - port: 8000 + targetPort: 8000 \ No newline at end of file diff --git a/charts/paperless-ngx/values.yaml b/charts/paperless-ngx/values.yaml new file mode 100644 index 0000000..db0651f --- /dev/null +++ b/charts/paperless-ngx/values.yaml @@ -0,0 +1,12 @@ +config: + externalUrl: https://paperless.example.com/ + timezone: America/Los_Angeles + ocrLanguage: eng + textRecognitionLanguates: eng nor + +persistence: + existingClaim: paperless-ngx-server + +image: + repository: ghcr.io/paperless-ngx/paperless-ngx + tag: v2.7.0 \ No newline at end of file