matrix.yaml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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: ["run", "-H", "matrix.dezendorf.net", "-m", "synapse.app.homeserver", "--config-path", "/data/homeserver.yaml"]
  22. env:
  23. - name: SYNAPSE_SERVER_NAME
  24. value: "matrix.dezendorf.net"
  25. ports:
  26. - name: web
  27. containerPort: 8008
  28. volumeMounts:
  29. - name: "matrix-homeserver-yaml"
  30. mountPath: "/data/homeserver.yaml"
  31. subPath: "homeserver.yaml"
  32. readOnly: false
  33. volumes:
  34. - name: "matrix-homeserver-yaml"
  35. configMap:
  36. name: "matrix-homeserver-yaml"
  37. ---
  38. apiVersion: v1
  39. kind: Service
  40. metadata:
  41. name: matrix
  42. spec:
  43. type: ClusterIP
  44. ports:
  45. - name: web
  46. port: 8008
  47. selector:
  48. app: matrix
  49. ---
  50. apiVersion: traefik.containo.us/v1alpha1
  51. kind: IngressRoute
  52. metadata:
  53. name: matrix-ingress-route
  54. namespace: default
  55. spec:
  56. entryPoints:
  57. - web
  58. routes:
  59. - match: ((Host(`matrix`)||Host(`matrix.dezendorf.net`)))
  60. kind: Rule
  61. priority: 1
  62. services:
  63. - name: matrix
  64. port: 8008
  65. ---
  66. apiVersion: traefik.containo.us/v1alpha1
  67. kind: IngressRoute
  68. metadata:
  69. name: matrix-websecure-route
  70. namespace: default
  71. spec:
  72. entryPoints:
  73. - websecure
  74. routes:
  75. - match: Host(`matrix.dezendorf.net`)
  76. kind: Rule
  77. services:
  78. - name: matrix
  79. port: 8008
  80. tls:
  81. certResolver: myresolver
  82. ---
  83. apiVersion: v1
  84. kind: ConfigMap
  85. metadata:
  86. name: matrix-homeserver-yaml
  87. namespace: default
  88. data:
  89. matrix-homeserver-yaml: |
  90. # Configuration file for Synapse.
  91. #
  92. # This is a YAML file: see [1] for a quick introduction. Note in particular
  93. # that *indentation is important*: all the elements of a list or dictionary
  94. # should have the same indentation.
  95. #
  96. # [1] https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html
  97. #
  98. # For more information on how to configure Synapse, including a complete accounting of
  99. # each option, go to docs/usage/configuration/config_documentation.md or
  100. # https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html
  101. server_name: "matrix.dezendorf.net"
  102. pid_file: /homeserver.pid
  103. listeners:
  104. - port: 8008
  105. tls: false
  106. type: http
  107. x_forwarded: true
  108. bind_addresses: ['::1', '127.0.0.1']
  109. resources:
  110. - names: [client, federation]
  111. compress: false
  112. database:
  113. name: sqlite3
  114. args:
  115. database: /homeserver.db
  116. log_config: "/tmp/matrix.dezendorf.net.log.config"
  117. media_store_path: /media_store
  118. registration_shared_secret: "9.^i#+7YXwrC^bzKMqkenOZb;9ra6jV0zgZMvO:EBQ.CipL47k"
  119. report_stats: false
  120. macaroon_secret_key: ".ughvXa0Or.Xv7o5y550cXnTlv.J8*Mq@JAA^1QXuu2bpR@Lpd"
  121. form_secret: "iESBV0d@Tg;4~:v5KT3-UX.Kva@.cbJZ9SNU:nWKubPo:X^*Y-"
  122. signing_key_path: "/tmp/matrix.dezendorf.net.signing.key"
  123. trusted_key_servers:
  124. - server_name: "matrix.org"