copyparty.yaml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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. nohash: .*
  95. noidx: .*
  96. daw
  97. dthumb
  98. lifetime: 604800 # 1wk
  99. [/priv/Archive/SMS]
  100. /w/priv/Archive/SMS
  101. accs:
  102. A: josh
  103. flags:
  104. noidx: .*
  105. nohash: .*
  106. daw
  107. dthumb
  108. lifetime: 7257600 # 3mo
  109. [/writes]
  110. /w/writes
  111. accs:
  112. w: *
  113. A: josh
  114. flags:
  115. lifetime: 604800 # 1wk
  116. xz: 0
  117. dthumb
  118. ---
  119. apiVersion: v1
  120. kind: Service
  121. metadata:
  122. name: copyparty-service
  123. namespace: copyparty
  124. spec:
  125. selector:
  126. app: copyparty
  127. type: ClusterIP
  128. ports:
  129. - name: copyparty-web-port
  130. protocol: TCP
  131. port: 3923
  132. targetPort: http-web-svc
  133. ---
  134. apiVersion: networking.k8s.io/v1
  135. kind: Ingress
  136. metadata:
  137. name: copyparty
  138. namespace: copyparty
  139. annotations:
  140. traefik.ingress.kubernetes.io/router.entrypoints: websecure
  141. spec:
  142. rules:
  143. - host: copyparty.jibby.org
  144. http:
  145. paths:
  146. - path: /
  147. pathType: Prefix
  148. backend:
  149. service:
  150. name: copyparty-service
  151. port:
  152. number: 3923
  153. ---
  154. apiVersion: external-secrets.io/v1
  155. kind: ExternalSecret
  156. metadata:
  157. name: copyparty-accounts
  158. namespace: copyparty
  159. spec:
  160. target:
  161. name: copyparty-accounts
  162. deletionPolicy: Delete
  163. template:
  164. type: Opaque
  165. data:
  166. accounts.conf: |-
  167. [accounts]
  168. {{ .username }}: {{ .password }}
  169. data:
  170. - secretKey: username
  171. sourceRef:
  172. storeRef:
  173. name: bitwarden-login
  174. kind: ClusterSecretStore
  175. remoteRef:
  176. key: 7c7ffb0a-c14d-4091-ab94-b32d016335e6
  177. property: username
  178. - secretKey: password
  179. sourceRef:
  180. storeRef:
  181. name: bitwarden-login
  182. kind: ClusterSecretStore
  183. remoteRef:
  184. key: 7c7ffb0a-c14d-4091-ab94-b32d016335e6
  185. property: password