copyparty.yaml 3.9 KB

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