copyparty.yaml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. ---
  2. apiVersion: apps/v1
  3. kind: Deployment
  4. metadata:
  5. name: copyparty
  6. namespace: copyparty
  7. spec:
  8. strategy:
  9. type: Recreate
  10. selector:
  11. matchLabels:
  12. app: copyparty
  13. replicas: 1
  14. template:
  15. metadata:
  16. labels:
  17. app: copyparty
  18. annotations:
  19. backup.velero.io/backup-volumes-excludes: copyparty
  20. spec:
  21. containers:
  22. - name: copyparty
  23. image: copyparty/ac:latest
  24. imagePullPolicy: Always
  25. ports:
  26. - containerPort: 3923
  27. name: http-web-svc
  28. volumeMounts:
  29. - mountPath: "/w"
  30. name: copyparty
  31. - name: accounts
  32. mountPath: /cfg/accounts.conf
  33. subPath: accounts.conf
  34. - name: config-default
  35. mountPath: /cfg/default.conf
  36. subPath: default.conf
  37. resources:
  38. requests:
  39. memory: "0"
  40. limits:
  41. memory: "3Gi"
  42. volumes:
  43. - name: copyparty
  44. persistentVolumeClaim:
  45. claimName: copyparty-pvc
  46. - name: config-default
  47. configMap:
  48. name: copyparty-config
  49. configMap:
  50. items:
  51. - key: default.conf
  52. path: default.conf
  53. - name: accounts
  54. secret:
  55. secretName: copyparty-accounts
  56. ---
  57. apiVersion: v1
  58. kind: ConfigMap
  59. metadata:
  60. name: copyparty-config
  61. namespace: copyparty
  62. data:
  63. default.conf: |
  64. [global]
  65. p: 3923
  66. e2dsa # enable file indexing and filesystem scanning
  67. e2ts # and enable multimedia indexing
  68. name: copyparty.jibby.org
  69. qr
  70. qrs # HTTPS QR code
  71. qri: copyparty.jibby.org
  72. xff-src: lan
  73. rproxy: -1
  74. dav-auth
  75. usernames
  76. # create volumes:
  77. [/pub]
  78. /w/pub
  79. accs:
  80. r: *
  81. A: josh
  82. flags:
  83. og
  84. #og_ua: '(Discord|Twitter|Slack)bot' # doesn't work w/ signal
  85. [/priv]
  86. /w/priv
  87. accs:
  88. A: josh
  89. [/priv/Archive/Signal]
  90. /w/priv/Archive/Signal
  91. accs:
  92. A: josh
  93. flags:
  94. e2ds
  95. lifetime: 604800 # 1wk
  96. daw
  97. nohash: .*
  98. dthumb
  99. [/priv/Archive/SMS]
  100. /w/priv/Archive/SMS
  101. accs:
  102. A: josh
  103. flags:
  104. lifetime: 7257600 # 3mo
  105. daw
  106. dthumb
  107. [/writes]
  108. /w/writes
  109. accs:
  110. w: *
  111. A: josh
  112. flags:
  113. lifetime: 604800 # 1wk
  114. xz: 0
  115. dthumb
  116. ---
  117. apiVersion: v1
  118. kind: Service
  119. metadata:
  120. name: copyparty-service
  121. namespace: copyparty
  122. spec:
  123. selector:
  124. app: copyparty
  125. type: ClusterIP
  126. ports:
  127. - name: copyparty-web-port
  128. protocol: TCP
  129. port: 3923
  130. targetPort: http-web-svc
  131. ---
  132. apiVersion: networking.k8s.io/v1
  133. kind: Ingress
  134. metadata:
  135. name: copyparty
  136. namespace: copyparty
  137. annotations:
  138. traefik.ingress.kubernetes.io/router.entrypoints: websecure
  139. spec:
  140. rules:
  141. - host: copyparty.jibby.org
  142. http:
  143. paths:
  144. - path: /
  145. pathType: Prefix
  146. backend:
  147. service:
  148. name: copyparty-service
  149. port:
  150. number: 3923
  151. ---
  152. apiVersion: external-secrets.io/v1
  153. kind: ExternalSecret
  154. metadata:
  155. name: copyparty-accounts
  156. namespace: copyparty
  157. spec:
  158. target:
  159. name: copyparty-accounts
  160. deletionPolicy: Delete
  161. template:
  162. type: Opaque
  163. data:
  164. accounts.conf: |-
  165. [accounts]
  166. {{ .username }}: {{ .password }}
  167. data:
  168. - secretKey: username
  169. sourceRef:
  170. storeRef:
  171. name: bitwarden-login
  172. kind: ClusterSecretStore
  173. remoteRef:
  174. key: 7c7ffb0a-c14d-4091-ab94-b32d016335e6
  175. property: username
  176. - secretKey: password
  177. sourceRef:
  178. storeRef:
  179. name: bitwarden-login
  180. kind: ClusterSecretStore
  181. remoteRef:
  182. key: 7c7ffb0a-c14d-4091-ab94-b32d016335e6
  183. property: password