60 lines
1.6 KiB
YAML
60 lines
1.6 KiB
YAML
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: paperless-ngx
|
|
namespace: default
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: paperless-ngx
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: paperless-ngx
|
|
spec:
|
|
initContainers:
|
|
- name: wait-for-db
|
|
image: busybox
|
|
command:
|
|
- sh
|
|
- -c
|
|
- |
|
|
until nc -z -v -w30 paperless-ngx-db-service 6379; do
|
|
echo "Waiting for database to be ready..."
|
|
sleep 2
|
|
done
|
|
containers:
|
|
- name: paperless-ngx
|
|
image: ghcr.io/paperless-ngx/paperless-ngx:2.15.3
|
|
ports:
|
|
- containerPort: 8000
|
|
env:
|
|
- name: PAPERLESS_REDIS
|
|
value: "redis://paperless-ngx-db-service:6379"
|
|
- name: PAPERLESS_URL
|
|
value: "https://ngx.akshun-lab.uk"
|
|
- name: PAPERLESS_CSRF_TRUSTED_ORIGINS
|
|
value: "https://*.akshun-lab.uk"
|
|
- name: PAPERLESS_CORS_ALLOWED_HOSTS
|
|
value: "https://ngx.akshun-lab.uk"
|
|
- name: PAPERLESS_TIME_ZONE
|
|
value: "Asia/Kolkata"
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /usr/src/paperless/data
|
|
subPath: data
|
|
- name: data
|
|
mountPath: usr/src/paperless/media
|
|
subPath: media
|
|
- name: data
|
|
mountPath: /usr/src/paperless/export
|
|
subPath: export
|
|
- name: data
|
|
mountPath: /usr/src/paperless/consume
|
|
subPath: consume
|
|
volumes:
|
|
- name: data
|
|
persistentVolumeClaim:
|
|
claimName: longhorn-paperless-data
|