Matrix Docker Ansible eploy
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 

289 řádky
8.1 KiB

  1. ##
  2. # This is a configuration for Sygnal, the reference Push Gateway for Matrix
  3. # See: matrix.org
  4. ##
  5. # The 'database' setting defines the database that sygnal uses to store all of
  6. # its data.
  7. #
  8. # 'name' gives the database engine to use: either 'sqlite3' (for SQLite) or
  9. # 'psycopg2' (for PostgreSQL).
  10. #
  11. # 'args' gives options which are passed through to the database engine,
  12. # except for options starting 'cp_', which are used to configure the Twisted
  13. # connection pool. For a reference to valid arguments, see:
  14. # * for sqlite: https://docs.python.org/3/library/sqlite3.html#sqlite3.connect
  15. # * for postgres: https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS
  16. # * for the connection pool: https://twistedmatrix.com/documents/current/api/twisted.enterprise.adbapi.ConnectionPool.html#__init__
  17. #
  18. #
  19. # Example SQLite configuration:
  20. #
  21. #database:
  22. # name: sqlite3
  23. # args:
  24. # dbfile: /path/to/database.db
  25. #
  26. #
  27. # Example Postgres configuration:
  28. #
  29. #database:
  30. # name: psycopg2
  31. # args:
  32. # host: localhost
  33. # database: sygnal
  34. # user: sygnal
  35. # password: pass
  36. # cp_min: 1
  37. # cp_max: 5
  38. #
  39. {% if matrix_sygnal_database_engine == 'sqlite' %}
  40. database:
  41. name: sqlite3
  42. args:
  43. dbfile: {{ matrix_sygnal_sqlite_database_path_in_container|to_json }}
  44. {% else %}
  45. database:
  46. name: psycopg2
  47. args:
  48. host: {{ matrix_sygnal_database_hostname|to_json }}
  49. database: {{ matrix_sygnal_database_name|to_json }}
  50. user: {{ matrix_sygnal_database_username|to_json }}
  51. password: {{ matrix_sygnal_database_password|to_json }}
  52. cp_min: 1
  53. cp_max: 5
  54. {% endif %}
  55. ## Logging #
  56. #
  57. log:
  58. # Specify a Python logging 'dictConfig', as described at:
  59. # https://docs.python.org/3.7/library/logging.config.html#logging.config.dictConfig
  60. #
  61. setup:
  62. version: 1
  63. formatters:
  64. normal:
  65. format: "%(asctime)s [%(process)d] %(levelname)-5s %(name)s %(message)s"
  66. handlers:
  67. # This handler prints to Standard Error
  68. #
  69. stderr:
  70. class: "logging.StreamHandler"
  71. formatter: "normal"
  72. stream: "ext://sys.stderr"
  73. # This handler prints to Standard Output.
  74. #
  75. stdout:
  76. class: "logging.StreamHandler"
  77. formatter: "normal"
  78. stream: "ext://sys.stdout"
  79. # This handler demonstrates logging to a text file on the filesystem.
  80. # You can use logrotate(8) to perform log rotation.
  81. #
  82. #file:
  83. # class: "logging.handlers.WatchedFileHandler"
  84. # formatter: "normal"
  85. # filename: "./sygnal.log"
  86. loggers:
  87. # sygnal.access contains the access logging lines.
  88. # Comment out this section if you don't want to give access logging
  89. # any special treatment.
  90. #
  91. sygnal.access:
  92. propagate: false
  93. handlers: ["stdout"]
  94. level: "INFO"
  95. # sygnal contains log lines from Sygnal itself.
  96. # You can comment out this section to fall back to the root logger.
  97. #
  98. sygnal:
  99. propagate: false
  100. handlers: ["stderr"]
  101. root:
  102. # Specify the handler(s) to send log messages to.
  103. handlers: ["stderr"]
  104. level: "INFO"
  105. disable_existing_loggers: false
  106. access:
  107. # Specify whether or not to trust the IP address in the `X-Forwarded-For`
  108. # header. In general, you want to enable this if and only if you are using a
  109. # reverse proxy which is configured to emit it.
  110. #
  111. x_forwarded_for: true
  112. ## HTTP Server (Matrix Push Gateway API) #
  113. #
  114. http:
  115. # Specify a list of interface addresses to bind to.
  116. #
  117. # This example listens on the IPv4 loopback device:
  118. #bind_addresses: ['127.0.0.1']
  119. # This example listens on all IPv4 interfaces:
  120. #bind_addresses: ['0.0.0.0']
  121. # This example listens on all IPv4 and IPv6 interfaces:
  122. #bind_addresses: ['0.0.0.0', '::']
  123. bind_addresses: ['::']
  124. # Specify the port number to listen on.
  125. #
  126. port: 6000
  127. ## Proxying for outgoing connections #
  128. #
  129. # Specify the URL of a proxy to use for outgoing traffic
  130. # (e.g. to Apple & Google) if desired.
  131. # Currently only HTTP proxies with CONNECT capability are supported.
  132. #
  133. # If you do not specify a value, the `HTTPS_PROXY` environment variable will
  134. # be used if present. Otherwise, no proxy will be used.
  135. #
  136. # Default is unspecified.
  137. #
  138. #proxy: 'http://user:secret@prox:8080'
  139. ## Metrics #
  140. #
  141. metrics:
  142. ## Prometheus #
  143. #
  144. prometheus:
  145. # Specify whether or not to enable Prometheus.
  146. #
  147. enabled: false
  148. # Specify an address for the Prometheus HTTP Server to listen on.
  149. #
  150. address: '0.0.0.0'
  151. # Specify a port for the Prometheus HTTP Server to listen on.
  152. #
  153. port: 8000
  154. ## OpenTracing #
  155. #
  156. opentracing:
  157. # Specify whether or not to enable OpenTracing.
  158. #
  159. enabled: false
  160. # Specify an implementation of OpenTracing to use. Currently only 'jaeger'
  161. # is supported.
  162. #
  163. implementation: jaeger
  164. # Specify the service name to be reported to the tracer.
  165. #
  166. service_name: sygnal
  167. # Specify configuration values to pass to jaeger_client.
  168. #
  169. jaeger:
  170. sampler:
  171. type: 'const'
  172. param: 1
  173. # local_agent:
  174. # reporting_host: '127.0.0.1'
  175. # reporting_port:
  176. logging: true
  177. ## Sentry #
  178. #
  179. sentry:
  180. # Specify whether or not to enable Sentry.
  181. #
  182. enabled: false
  183. # Specify your Sentry DSN if you enable Sentry
  184. #
  185. #dsn: "https://<key>@sentry.example.org/<project>"
  186. ## Pushkins/Apps #
  187. #
  188. # Add a section for every push application here.
  189. # Specify the pushkey for the application and also the type.
  190. # For the type, you may specify a fully-qualified Python classname if desired.
  191. #
  192. #apps:
  193. # This is an example APNs push configuration
  194. #
  195. #com.example.myapp.ios:
  196. # type: apns
  197. #
  198. # # Authentication
  199. # #
  200. # # Two methods of authentication to APNs are currently supported.
  201. # #
  202. # # You can authenticate using a key:
  203. # keyfile: my_key.p8
  204. # key_id: MY_KEY_ID
  205. # team_id: MY_TEAM_ID
  206. # topic: MY_TOPIC
  207. #
  208. # # Or, a certificate can be used instead:
  209. # certfile: com.example.myApp_prod_APNS.pem
  210. #
  211. # # This is the maximum number of in-flight requests *for this pushkin*
  212. # # before additional notifications will be failed.
  213. # # (This is a robustness measure to prevent one pushkin stacking up with
  214. # # queued requests and saturating the inbound connection queue of a load
  215. # # balancer or reverse proxy).
  216. # # Defaults to 512 if unset.
  217. # #
  218. # #inflight_request_limit: 512
  219. #
  220. # # Specifies whether to use the production or sandbox APNs server. Note that
  221. # # sandbox tokens should only be used with the sandbox server and vice versa.
  222. # #
  223. # # Valid options are:
  224. # # * production
  225. # # * sandbox
  226. # #
  227. # # The default is 'production'. Uncomment to use the sandbox instance.
  228. # #platform: sandbox
  229. # This is an example GCM/FCM push configuration.
  230. #
  231. #com.example.myapp.android:
  232. # type: gcm
  233. # api_key: your_api_key_for_gcm
  234. #
  235. # # This is the maximum number of connections to GCM servers at any one time
  236. # # the default is 20.
  237. # #max_connections: 20
  238. #
  239. # # This is the maximum number of in-flight requests *for this pushkin*
  240. # # before additional notifications will be failed.
  241. # # (This is a robustness measure to prevent one pushkin stacking up with
  242. # # queued requests and saturating the inbound connection queue of a load
  243. # # balancer or reverse proxy).
  244. # # Defaults to 512 if unset.
  245. # #
  246. # #inflight_request_limit: 512
  247. #
  248. # # This allows you to specify additional options to send to Firebase.
  249. # #
  250. # # Of particular interest, admins who wish to support iOS apps using Firebase
  251. # # probably wish to set content_available, and may need to set mutable_content.
  252. # # (content_available allows your iOS app to be woken up by data messages,
  253. # # and mutable_content allows your notification to be modified by a
  254. # # Notification Service app extension).
  255. # #
  256. # # See https://firebase.google.com/docs/cloud-messaging/http-server-ref
  257. # # for the exhaustive list of valid options.
  258. # #
  259. # # Do not specify `data`, `priority`, `to` or `registration_ids` as they may
  260. # # be overwritten or lead to an invalid request.
  261. # #
  262. # #fcm_options:
  263. # # content_available: true
  264. # # mutable_content: true
  265. apps: {{ matrix_sygnal_apps|to_json }}