matrix.yaml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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. env:
  22. - name: SYNAPSE_SERVER_NAME
  23. value: "matrix.dezendorf.net"
  24. ports:
  25. - name: web
  26. containerPort: 8008
  27. volumeMounts:
  28. - name: "matrix-homeserver-yaml"
  29. mountPath: "/data/homeserver-yaml"
  30. subPath: "matrix-homeserver-yaml"
  31. readOnly: true
  32. volumes:
  33. - name: "matrix-homeserver-yaml"
  34. configMap:
  35. name: "matrix-homesever-yaml"
  36. ---
  37. apiVersion: v1
  38. kind: Service
  39. metadata:
  40. name: matrix
  41. spec:
  42. type: ClusterIP
  43. ports:
  44. - name: web
  45. port: 8008
  46. selector:
  47. app: matrix
  48. ---
  49. apiVersion: traefik.containo.us/v1alpha1
  50. kind: IngressRoute
  51. metadata:
  52. name: matrix-ingress-route
  53. namespace: default
  54. spec:
  55. entryPoints:
  56. - web
  57. routes:
  58. - match: ((Host(`matrix`)||Host(`matrix.dezendorf.net`)))
  59. kind: Rule
  60. priority: 1
  61. services:
  62. - name: matrix
  63. port: 8008
  64. ---
  65. apiVersion: traefik.containo.us/v1alpha1
  66. kind: IngressRoute
  67. metadata:
  68. name: matrix-websecure-route
  69. namespace: default
  70. spec:
  71. entryPoints:
  72. - websecure
  73. routes:
  74. - match: Host(`matrix.dezendorf.net`)
  75. kind: Rule
  76. services:
  77. - name: matrix
  78. port: 8008
  79. tls:
  80. certResolver: myresolver
  81. ---
  82. apiVersion: v1
  83. kind: ConfigMap
  84. metadata:
  85. name: matrix-homeserver-yaml
  86. namespace: default
  87. data:
  88. matrix-homeserver-yaml: |
  89. # This file is maintained as an up-to-date snapshot of the default
  90. # homeserver.yaml configuration generated by Synapse. You can find a
  91. # complete accounting of possible configuration options at
  92. # https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html
  93. #
  94. # It is *not* intended to be copied and used as the basis for a real
  95. # homeserver.yaml. Instead, if you are starting from scratch, please generate
  96. # a fresh config using Synapse by following the instructions in
  97. # https://matrix-org.github.io/synapse/latest/setup/installation.html.
  98. #
  99. ################################################################################
  100. # Configuration file for Synapse.
  101. #
  102. # This is a YAML file: see [1] for a quick introduction. Note in particular
  103. # that *indentation is important*: all the elements of a list or dictionary
  104. # should have the same indentation.
  105. #
  106. # [1] https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html
  107. #
  108. # For more information on how to configure Synapse, including a complete accounting of
  109. # each option, go to docs/usage/configuration/config_documentation.md or
  110. # https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html
  111. server_name: "MATRIX.DEZENDORF.NET"
  112. pid_file: DATADIR/homeserver.pid
  113. listeners:
  114. - port: 8008
  115. tls: false
  116. type: http
  117. x_forwarded: true
  118. bind_addresses: ['::1', '127.0.0.1']
  119. resources:
  120. - names: [client, federation]
  121. compress: false
  122. database:
  123. name: sqlite3
  124. args:
  125. database: DATADIR/homeserver.db
  126. log_config: "CONFDIR/SERVERNAME.log.config"
  127. media_store_path: DATADIR/media_store
  128. signing_key_path: "CONFDIR/SERVERNAME.signing.key"
  129. trusted_key_servers:
  130. - server_name: "matrix.dezendorf.net"