matrix.yaml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. ---
  2. kind: Deployment
  3. apiVersion: apps/v1
  4. metadata:
  5. name: matrix
  6. labels:
  7. app: matrix
  8. spec:
  9. replicas: 1
  10. selector:
  11. matchLabels:
  12. app: matrix
  13. template:
  14. metadata:
  15. labels:
  16. app: matrix
  17. spec:
  18. containers:
  19. - name: matrix
  20. image: ghcr.io/element-hq/synapse
  21. #command: ["/bin/bash", "-c", "--"]
  22. #args: ["while true; do sleep 3; done;"]
  23. env:
  24. - name: SYNAPSE_SERVER_NAME
  25. value: "matrix.dezendorf.net"
  26. - name: SYNAPSE_CONFIG_PATH
  27. value: "/data/homeserver.yaml"
  28. ports:
  29. - name: web
  30. containerPort: 8008
  31. volumeMounts:
  32. - name: data-emptydir
  33. mountPath: "/data"
  34. - name: "matrix-homeserver-yaml"
  35. mountPath: "/data/homeserver.yaml"
  36. subPath: "homeserver-yaml"
  37. readOnly: no
  38. - name: "matrix-homeserver-yaml"
  39. mountPath: "/homeserver.log"
  40. subPath: "homeserver-log"
  41. readOnly: no
  42. - name: "matrix-homeserver-yaml"
  43. mountPath: "/data/matrix.dezendorf.net.log.config"
  44. subPath: "homeserver-log-config"
  45. readOnly: no
  46. volumes:
  47. - name: data-emptydir
  48. emptyDir: {}
  49. - name: "matrix-homeserver-yaml"
  50. configMap:
  51. defaultMode: 0777
  52. name: "matrix-homeserver-yaml"
  53. ---
  54. apiVersion: v1
  55. kind: Service
  56. metadata:
  57. name: matrix
  58. spec:
  59. type: ClusterIP
  60. ports:
  61. - name: web
  62. port: 8008
  63. selector:
  64. app: matrix
  65. ---
  66. apiVersion: traefik.containo.us/v1alpha1
  67. kind: IngressRoute
  68. metadata:
  69. name: matrix-ingress-route
  70. namespace: default
  71. spec:
  72. entryPoints:
  73. - web
  74. routes:
  75. - match: ((Host(`matrix`)||Host(`matrix.dezendorf.net`)))
  76. kind: Rule
  77. priority: 1
  78. services:
  79. - name: matrix
  80. port: 8008
  81. ---
  82. apiVersion: traefik.containo.us/v1alpha1
  83. kind: IngressRoute
  84. metadata:
  85. name: matrix-websecure-route
  86. namespace: default
  87. spec:
  88. entryPoints:
  89. - websecure
  90. routes:
  91. - match: Host(`matrix.dezendorf.net`)
  92. kind: Rule
  93. services:
  94. - name: matrix
  95. port: 8008
  96. tls:
  97. certResolver: myresolver
  98. ---
  99. apiVersion: v1
  100. kind: ConfigMap
  101. metadata:
  102. name: matrix-homeserver-yaml
  103. namespace: default
  104. data:
  105. homeserver-log: |
  106. homeserver-yaml: |
  107. # Configuration file for Synapse.
  108. #
  109. # This is a YAML file: see [1] for a quick introduction. Note in particular
  110. # that *indentation is important*: all the elements of a list or dictionary
  111. # should have the same indentation.
  112. #
  113. # [1] https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html
  114. #
  115. # For more information on how to configure Synapse, including a complete accounting of
  116. # each option, go to docs/usage/configuration/config_documentation.md or
  117. # https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html
  118. server_name: "matrix.dezendorf.net"
  119. pid_file: /data/homeserver.pid
  120. listeners:
  121. - port: 8008
  122. tls: false
  123. type: http
  124. x_forwarded: true
  125. #bind_addresses: ['::1', '127.0.0.1']
  126. resources:
  127. - names: [client, federation]
  128. compress: false
  129. database:
  130. name: sqlite3
  131. args:
  132. database: /data/homeserver.db
  133. log_config: "/data/matrix.dezendorf.net.log.config"
  134. media_store_path: /data/media_store
  135. registration_shared_secret: "9.^i#+7YXwrC^bzKMqkenOZb;9ra6jV0zgZMvO:EBQ.CipL47k"
  136. report_stats: false
  137. macaroon_secret_key: ".ughvXa0Or.Xv7o5y550cXnTlv.J8*Mq@JAA^1QXuu2bpR@Lpd"
  138. form_secret: "iESBV0d@Tg;4~:v5KT3-UX.Kva@.cbJZ9SNU:nWKubPo:X^*Y-"
  139. signing_key_path: "/data/matrix.dezendorf.net.signing.key"
  140. enable_registration: true
  141. enable_registration_captcha: true
  142. public_baseurl: "https://matrix.dezendorf.net"
  143. recaptcha_public_key: "6LddQ7EqAAAAACWLD1ZKUBKrLHoFvGWhFiNmrgPh"
  144. recaptcha_private_key: "6LddQ7EqAAAAAOX7Qrn2PL-s2r5Zo4c_aTi4uzkh"
  145. trusted_key_servers:
  146. - server_name: "matrix.org"
  147. homeserver-log-config: |
  148. version: 1
  149. formatters:
  150. precise:
  151. format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s - %(message)s'
  152. handlers:
  153. console:
  154. class: logging.StreamHandler
  155. formatter: precise
  156. loggers:
  157. # This is just here so we can leave `loggers` in the config regardless of whether
  158. # we configure other loggers below (avoid empty yaml dict error).
  159. _placeholder:
  160. level: "INFO"
  161. handlers: [console]
  162. synapse.storage.SQL:
  163. # beware: increasing this to DEBUG will make synapse log sensitive
  164. # information such as access tokens.
  165. level: INFO
  166. handlers: [console]
  167. root:
  168. level: INFO
  169. handlers: [console]
  170. disable_existing_loggers: false