paperless.yaml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. ---
  2. apiVersion: v1
  3. kind: Namespace
  4. metadata:
  5. name: paperless
  6. ---
  7. apiVersion: apps/v1
  8. kind: Deployment
  9. metadata:
  10. name: paperless
  11. namespace: paperless
  12. spec:
  13. strategy:
  14. type: Recreate
  15. selector:
  16. matchLabels:
  17. app: paperless
  18. replicas: 1
  19. template:
  20. metadata:
  21. labels:
  22. app: paperless
  23. spec:
  24. containers:
  25. - name: paperless
  26. image: ghcr.io/paperless-ngx/paperless-ngx:latest
  27. imagePullPolicy: Always
  28. ports:
  29. - containerPort: 8000
  30. name: http-web-svc
  31. volumeMounts:
  32. - mountPath: "/usr/src/paperless/data"
  33. name: data
  34. subPath: data
  35. - mountPath: "/usr/src/paperless/media"
  36. name: data
  37. subPath: media
  38. - mountPath: "/usr/src/paperless/export"
  39. name: data
  40. subPath: export
  41. - mountPath: "/usr/src/paperless/consume"
  42. name: data
  43. subPath: consume
  44. env:
  45. - name: PAPERLESS_REDIS
  46. valueFrom:
  47. secretKeyRef:
  48. name: paperless-secret
  49. key: PAPERLESS_REDIS
  50. - name: PAPERLESS_DBHOST
  51. value: postgres-postgresql.postgres.svc.cluster.local
  52. - name: PAPERLESS_URL
  53. value: https://paperless.jibby.org
  54. - name: POSTGRES_DB
  55. value: paperless
  56. - name: PAPERLESS_DBUSER
  57. valueFrom:
  58. secretKeyRef:
  59. name: paperless-secret
  60. key: PAPERLESS_DBUSER
  61. - name: PAPERLESS_DBPASS
  62. valueFrom:
  63. secretKeyRef:
  64. name: paperless-secret
  65. key: PAPERLESS_DBPASS
  66. volumes:
  67. - name: data
  68. persistentVolumeClaim:
  69. claimName: paperless-pvc
  70. ---
  71. apiVersion: v1
  72. kind: Service
  73. metadata:
  74. name: paperless-service
  75. namespace: paperless
  76. spec:
  77. selector:
  78. app: paperless
  79. type: ClusterIP
  80. ports:
  81. - name: paperless-web-port
  82. protocol: TCP
  83. port: 8000
  84. targetPort: http-web-svc