Matrix Docker Ansible eploy
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 

619 rindas
32 KiB

  1. # General repo configuration
  2. repo:
  3. bindAddress: {{ matrix_media_repo_bind_address | to_json }}
  4. port: {{ matrix_media_repo_port | to_json }}
  5. # Where to store the logs, relative to where the repo is started from. Logs will be automatically
  6. # rotated every day and held for 14 days. To disable the repo logging to files, set this to
  7. # "-" (including quotation marks).
  8. #
  9. # Note: to change the log directory you'll have to restart the repository. This setting cannot be
  10. # live reloaded.
  11. logDirectory: {{ matrix_media_repo_log_directory | to_json }}
  12. # Set to true to enable color coding in your logs. Note that this may cause escape sequences to
  13. # appear in logs which render them unreadable, which is why colors are disabled by default.
  14. logColors: {{ matrix_media_repo_log_colors | to_json }}
  15. # Set to true to enable JSON logging for consumption by things like logstash. Note that this is
  16. # incompatible with the log color option and will always render without colors.
  17. jsonLogs: {{ matrix_media_repo_json_logs | to_json }}
  18. # The log level to log at. Note that this will need to be at least "info" to receive support.
  19. #
  20. # Values (in increasing spam): panic | fatal | error | warn | info | debug | trace
  21. logLevel: {{ matrix_media_repo_log_level | to_json }}
  22. # If true, the media repo will accept any X-Forwarded-For header without validation. In most cases
  23. # this option should be left as "false". Note that the media repo already expects an X-Forwarded-For
  24. # header, but validates it to ensure the IP being given makes sense.
  25. trustAnyForwardedAddress: {{ matrix_media_repo_trust_any_forwarded_address | to_json }}
  26. # If false, the media repo will not use the X-Forwarded-Host header commonly added by reverse proxies.
  27. # Typically this should remain as true, though in some circumstances it may need to be disabled.
  28. # See https://github.com/turt2live/matrix-media-repo/issues/202 for more information.
  29. useForwardedHost: {{ matrix_media_repo_use_forwarded_host | to_json }}
  30. # Options for dealing with federation
  31. federation:
  32. # On a per-host basis, the number of consecutive failures in calling the host before the
  33. # media repo will back off. This defaults to 20 if not given. Note that 404 errors from
  34. # the remote server do not count towards this.
  35. backoffAt: {{ matrix_media_repo_federation_backoff_at | to_json }}
  36. # The database configuration for the media repository
  37. # Do NOT put your homeserver's existing database credentials here. Create a new database and
  38. # user instead. Using the same server is fine, just not the same username and database.
  39. database:
  40. # Currently only "postgres" is supported.
  41. postgres: {{ matrix_media_repo_database_postgres | to_json }}
  42. # The database pooling options
  43. pool:
  44. # The maximum number of connects to hold open. More of these allow for more concurrent
  45. # processes to happen.
  46. maxConnections: {{ matrix_media_repo_database_max_connections | to_json }}
  47. # The maximum number of connects to leave idle. More of these reduces the time it takes
  48. # to serve requests in low-traffic scenarios.
  49. maxIdleConnections: {{ matrix_media_repo_database_max_idle_connections | to_json }}
  50. # The configuration for the homeservers this media repository is known to control. Servers
  51. # not listed here will not be able to upload media.
  52. #homeservers:
  53. # - name: example.org # This should match the server_name of your homeserver, and the Host header
  54. # # provided to the media repo.
  55. # csApi: "https://example.org/" # The base URL to where the homeserver can actually be reached
  56. # backoffAt: 10 # The number of consecutive failures in calling this homeserver before the
  57. # # media repository will start backing off. This defaults to 10 if not given.
  58. # adminApiKind: "matrix" # The kind of admin API the homeserver supports. If set to "matrix",
  59. # # the media repo will use the Synapse-defined endpoints under the
  60. # # unstable client-server API. When this is "synapse", the new /_synapse
  61. # # endpoints will be used instead. Unknown values are treated as the
  62. # # default, "matrix".
  63. {{ matrix_media_repo_homeservers | to_json | from_json | to_nice_yaml(indent=2, width=999999, sort_keys=false) }}
  64. # Options for controlling how access tokens work with the media repo. It is recommended that if
  65. # you are going to use these options that the `/logout` and `/logout/all` client-server endpoints
  66. # be proxied through this process. They will also be called on the homeserver, and the response
  67. # sent straight through the client - they are simply used to invalidate the cache faster for
  68. # a particular user. Without these, the access tokens might still work for a short period of time
  69. # after the user has already invalidated them.
  70. #
  71. # This will also cache errors from the homeserver.
  72. #
  73. # Note that when this config block is used outside of a per-domain config, all hosts will be
  74. # subject to the same cache. This also means that application services on limited homeservers
  75. # could be authorized on the wrong domain.
  76. #
  77. # ***************************************************************************
  78. # * IT IS HIGHLY RECOMMENDED TO USE PER-DOMAIN CONFIGS WITH THIS FEATURE. *
  79. # ***************************************************************************
  80. # accessTokens:
  81. # # The maximum time a cached access token will be considered valid. Set to zero (the default)
  82. # # to disable the cache and constantly hit the homeserver. This is recommended to be set to
  83. # # 43200 (12 hours) on servers with the logout endpoints proxied through the media repo, and
  84. # # zero for servers who do not proxy the endpoints through.
  85. # maxCacheTimeSeconds: 0
  86. #
  87. # # Whether or not to use the `appservices` config option below. If disabled (the default),
  88. # # the regular access token cache will be used for each user, potentially leading to high
  89. # # memory usage.
  90. # useLocalAppserviceConfig: false
  91. #
  92. # # The application services (and their namespaces) registered on the homeserver. Only used
  93. # # if `useLocalAppserviceConfig` is enabled (recommended).
  94. # #
  95. # # Usually the appservice will provide you with these config details - they'll just need
  96. # # translating from the appservice registration to here. Note that this does not require
  97. # # all options from the registration, and only requires the bare minimum required to run
  98. # # the media repo.
  99. # appservices:
  100. # - id: Name_of_appservice_for_your_reference
  101. # asToken: Secret_token_for_appservices_to_use
  102. # senderUserId: "@_example_bridge:yourdomain.com"
  103. # userNamespaces:
  104. # - regex: "@_example_bridge_.+:yourdomain.com"
  105. # # A note about regexes: it is best to suffix *all* namespaces with the homeserver
  106. # # domain users are valid for, as otherwise the appservice can use any user with
  107. # # any domain name it feels like, even if that domain is not configured with the
  108. # # media repo. This will lead to inaccurate reporting in the case of the media
  109. # # repo, and potentially leading to media being considered "remote".
  110. {{ matrix_media_repo_access_tokens | to_json | from_json | to_nice_yaml(indent=2, width=999999, sort_keys=false) }}
  111. # These users have full access to the administrative functions of the media repository.
  112. # See docs/admin.md for information on what these people can do. They must belong to one of the
  113. # configured homeservers above.
  114. {{ matrix_media_repo_admins | to_json | from_json | to_nice_yaml(indent=2, width=999999, sort_keys=false) }}
  115. # Shared secret auth is useful for applications building on top of the media repository, such
  116. # as a management interface. The `token` provided here is treated as a repository administrator
  117. # when shared secret auth is enabled: if the `token` is used in place of an access token, the'
  118. # request will be authorized. This is not limited to any particular domain, giving applications
  119. # the ability to use it on any configured hostname.
  120. sharedSecretAuth:
  121. # Set this to true to enable shared secret auth.
  122. enabled: {{ matrix_media_repo_shared_secret_auth_enabled | to_json }}
  123. # Use a secure value here to prevent unauthorized access to the media repository.
  124. token: {{ matrix_media_repo_shared_secret_auth_token | to_json }}
  125. # Datastores are places where media should be persisted. This isn't dedicated for just uploads:
  126. # thumbnails and other misc data is also stored in these places. The media repo, when looking
  127. # for a datastore to use, will always use the smallest datastore first.
  128. # datastores:
  129. # - type: file
  130. # enabled: false # Enable this to set up data storage.
  131. # # Datastores can be split into many areas when handling uploads. Media is still de-duplicated
  132. # # across all datastores (local content which duplicates remote content will re-use the remote
  133. # # content's location). This option is useful if your datastore is becoming very large, or if
  134. # # you want faster storage for a particular kind of media.
  135. # #
  136. # # The kinds available are:
  137. # # thumbnails - Used to store thumbnails of media (local and remote).
  138. # # remote_media - Original copies of remote media (servers not configured by this repo).
  139. # # local_media - Original uploads for local media.
  140. # # archives - Archives of content (GDPR and similar requests).
  141. # forKinds: ["thumbnails"]
  142. # opts:
  143. # path: /var/matrix/media
  144. #
  145. # - type: s3
  146. # enabled: false # Enable this to set up s3 uploads
  147. # forKinds: ["thumbnails", "remote_media", "local_media", "archives"]
  148. # opts:
  149. # # The s3 uploader needs a temporary location to buffer files to reduce memory usage on
  150. # # small file uploads. If the file size is unknown, the file is written to this location
  151. # # before being uploaded to s3 (then the file is deleted). If you aren't concerned about
  152. # # memory usage, set this to an empty string.
  153. # tempPath: "/tmp/mediarepo_s3_upload"
  154. # endpoint: sfo2.digitaloceanspaces.com
  155. # accessKeyId: ""
  156. # accessSecret: ""
  157. # ssl: true
  158. # bucketName: "your-media-bucket"
  159. # # An optional region for where this S3 endpoint is located. Typically not needed, though
  160. # # some providers will need this (like Scaleway). Uncomment to use.
  161. # #region: "sfo2"
  162. #
  163. # # The media repo does support an IPFS datastore, but only if the IPFS feature is enabled. If
  164. # # the feature is not enabled, this will not work. Note that IPFS support is experimental at
  165. # # the moment and not recommended for general use.
  166. # #
  167. # # NOTE: Everything you upload to IPFS will be publicly accessible, even when the media repo
  168. # # puts authentication on the download endpoints. Only use this option for cases where you
  169. # # expect your media to be publicly accessible.
  170. # - type: ipfs
  171. # enabled: false # Enable this to use IPFS support
  172. # forKinds: ["local_media"]
  173. # # The IPFS datastore currently has no options. It will use the daemon or HTTP API configured
  174. # # in the IPFS section of your main config.
  175. # opts: {}
  176. {{ matrix_media_repo_datastores | to_json | from_json | to_nice_yaml(indent=2, width=999999, sort_keys=false) }}
  177. # Options for controlling archives. Archives are exports of a particular user's content for
  178. # the purpose of GDPR or moving media to a different server.
  179. archiving:
  180. # Whether archiving is enabled or not. Default enabled.
  181. enabled: {{ matrix_media_repo_archiving_enabled | to_json }}
  182. # If true, users can request a copy of their own data. By default, only repository administrators
  183. # can request a copy.
  184. # This includes the ability for homeserver admins to request a copy of their own server's
  185. # data, as known to the repo.
  186. selfService: {{ matrix_media_repo_archiving_self_service | to_json }}
  187. # The number of bytes to target per archive before breaking up the files. This is independent
  188. # of any file upload limits and will require a similar amount of memory when performing an export.
  189. # The file size is also a target, not a guarantee - it is possible to have files that are smaller
  190. # or larger than the target. This is recommended to be approximately double the size of your
  191. # file upload limit, provided there is enough memory available for the demand of exporting.
  192. targetBytesPerPart: {{ matrix_media_repo_archiving_target_bytes_per_part | to_json }} # 200mb default
  193. # The file upload settings for the media repository
  194. # uploads:
  195. # # The maximum individual file size a user can upload.
  196. # maxBytes: 104857600 # 100MB default, 0 to disable
  197. #
  198. # # The minimum number of bytes to let people upload. This is recommended to be non-zero to
  199. # # ensure that the "cost" of running the media repo is worthwhile - small file uploads tend
  200. # # to waste more CPU and database resources than small files, thus a default of 100 bytes
  201. # # is applied here as an approximate break-even point.
  202. # minBytes: 100 # 100 bytes by default
  203. #
  204. # # The number of bytes to claim as the maximum size for uploads for the limits API. If this
  205. # # is not provided then the maxBytes setting will be used instead. This is useful to provide
  206. # # if the media repo's settings and the reverse proxy do not match for maximum request size.
  207. # # This is purely for informational reasons and does not actually limit any functionality.
  208. # # Set this to -1 to indicate that there is no limit. Zero will force the use of maxBytes.
  209. # #reportedMaxBytes: 104857600
  210. #
  211. # # Options for limiting how much content a user can upload. Quotas are applied to content
  212. # # associated with a user regardless of de-duplication. Quotas which affect remote servers
  213. # # or users will not take effect. When a user exceeds their quota they will be unable to
  214. # # upload any more media.
  215. # quotas:
  216. # # Whether or not quotas are enabled/enforced. Note that even when disabled the media repo
  217. # # will track how much media a user has uploaded. This is disabled by default.
  218. # enabled: false
  219. #
  220. # # The quota rules that affect users. The first rule to match the uploader will take effect.
  221. # # An implied rule which matches all users and has no quota is always last in this list,
  222. # # meaning that if no rules are supplied then users will be able to upload anything. Similarly,
  223. # # if no rules match a user then the implied rule will match, allowing the user to have no
  224. # # quota. The quota will let the user upload to 1 media past their quota, meaning that from
  225. # # a statistics perspective the user might exceed their quota however only by a small amount.
  226. # users:
  227. # - glob: "@*:*" # Affect all users. Use asterisks (*) to match any character.
  228. # maxBytes: 53687063712 # 50GB default, 0 to disable
  229. {{ matrix_media_repo_uploads | to_json | from_json | to_nice_yaml(indent=2, width=999999, sort_keys=false) }}
  230. # Settings related to downloading files from the media repository
  231. downloads:
  232. # The maximum number of bytes to download from other servers
  233. maxBytes: {{ matrix_media_repo_downloads_max_bytes | to_json }} # 100MB default, 0 to disable
  234. # The number of workers to use when downloading remote media. Raise this number if remote
  235. # media is downloading slowly or timing out.
  236. #
  237. # Maximum memory usage = numWorkers multiplied by the maximum download size
  238. # Average memory usage is dependent on how many concurrent downloads your users are doing.
  239. numWorkers: {{ matrix_media_repo_downloads_num_workers | to_json }}
  240. # How long, in minutes, to cache errors related to downloading remote media. Once this time
  241. # has passed, the media is able to be re-requested.
  242. failureCacheMinutes: {{ matrix_media_repo_downloads_failure_cache_minutes | to_json }}
  243. # The cache control settings for downloads. This can help speed up downloads for users by
  244. # keeping popular media in the cache. This cache is also used for thumbnails.
  245. cache:
  246. enabled: {{ matrix_media_repo_downloads_cache_enabled | to_json }}
  247. # The maximum size of cache to have. Higher numbers are better.
  248. maxSizeBytes: {{ matrix_media_repo_downloads_cache_max_size_bytes | to_json }} # 1GB default
  249. # The maximum file size to cache. This should normally be the same size as your maximum
  250. # upload size.
  251. maxFileSizeBytes: {{ matrix_media_repo_downloads_cache_max_file_size_bytes | to_json }} # 100MB default
  252. # The number of minutes to track how many downloads a file gets
  253. trackedMinutes: {{ matrix_media_repo_downloads_cache_tracked_minutes | to_json }}
  254. # The number of downloads a file must receive in the window above (trackedMinutes) in
  255. # order to be cached.
  256. minDownloads: {{ matrix_media_repo_downloads_cache_min_downloads | to_json }}
  257. # The minimum amount of time an item should remain in the cache. This prevents the cache
  258. # from cycling out the file if it needs more room during this time. Note that the media
  259. # repo regularly cleans out media which is past this point from the cache, so this number
  260. # may need increasing depending on your use case. If the maxSizeBytes is reached for the
  261. # media repo, and some cached items are still under this timer, new items will not be able
  262. # to enter the cache. When this happens, consider raising maxSizeBytes or lowering this
  263. # timer.
  264. minCacheTimeSeconds: {{ matrix_media_repo_downloads_cache_min_cache_time_seconds | to_json }}
  265. # The minimum amount of time an item should remain outside the cache once it is removed.
  266. minEvictedTimeSeconds: {{ matrix_media_repo_downloads_cache_min_evicted_time_seconds | to_json }}
  267. # How many days after a piece of remote content is downloaded before it expires. It can be
  268. # re-downloaded on demand, this just helps free up space in your datastore. Set to zero or
  269. # negative to disable. Defaults to disabled.
  270. expireAfterDays: {{ matrix_media_repo_downloads_expire_after_days | to_json }}
  271. # URL Preview settings
  272. # urlPreviews:
  273. # enabled: true # If enabled, the preview_url routes will be accessible
  274. # maxPageSizeBytes: 10485760 # 10MB default, 0 to disable
  275. #
  276. # # If true, the media repository will try to provide previews for URLs with invalid or unsafe
  277. # # certificates. If false (the default), the media repo will fail requests to said URLs.
  278. # previewUnsafeCertificates: false
  279. #
  280. # # Note: URL previews are limited to a given number of words, which are then limited to a number
  281. # # of characters, taking off the last word if it needs to. This also applies for the title.
  282. #
  283. # numWords: 50 # The number of words to include in a preview (maximum)
  284. # maxLength: 200 # The maximum number of characters for a description
  285. #
  286. # numTitleWords: 30 # The maximum number of words to include in a preview's title
  287. # maxTitleLength: 150 # The maximum number of characters for a title
  288. #
  289. # # The mime types to preview when OpenGraph previews cannot be rendered. OpenGraph previews are
  290. # # calculated on anything matching "text/*". To have a thumbnail in the preview the URL must be
  291. # # an image and the image's type must be allowed by the thumbnailer.
  292. # filePreviewTypes:
  293. # - "image/*"
  294. #
  295. # # The number of workers to use when generating url previews. Raise this number if url
  296. # # previews are slow or timing out.
  297. # #
  298. # # Maximum memory usage = numWorkers multiplied by the maximum page size
  299. # # Average memory usage is dependent on how many concurrent urls your users are previewing.
  300. # numWorkers: 10
  301. #
  302. # # Either allowedNetworks or disallowedNetworks must be provided. If both are provided, they
  303. # # will be merged. URL previews will be disabled if neither is supplied. Each entry must be
  304. # # a CIDR range.
  305. # disallowedNetworks:
  306. # - "127.0.0.1/8"
  307. # - "10.0.0.0/8"
  308. # - "172.16.0.0/12"
  309. # - "192.168.0.0/16"
  310. # - "100.64.0.0/10"
  311. # - "169.254.0.0/16"
  312. # - '::1/128'
  313. # - 'fe80::/64'
  314. # - 'fc00::/7'
  315. # allowedNetworks:
  316. # - "0.0.0.0/0" # "Everything". The blacklist will help limit this.
  317. # # This is the default value for this field.
  318. #
  319. # # How many days after a preview is generated before it expires and is deleted. The preview
  320. # # can be regenerated safely - this just helps free up some space in your database. Set to
  321. # # zero or negative to disable. Defaults to disabled.
  322. # expireAfterDays: 0
  323. #
  324. # # The default Accept-Language header to supply when generating URL previews when one isn't
  325. # # supplied by the client.
  326. # # Reference: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language
  327. # defaultLanguage: "en-US,en"
  328. #
  329. # # When true, oEmbed previews will be enabled. Typically these kinds of previews are used for
  330. # # sites that do not support OpenGraph or page scraping, such as Twitter. For information on
  331. # # specifying providers for oEmbed, including your own, see the following documentation:
  332. # # https://docs.t2bot.io/matrix-media-repo/url-previews/oembed.html
  333. # # Defaults to disabled.
  334. # oEmbed: false
  335. {{ matrix_media_repo_url_previews | to_json | from_json | to_nice_yaml(indent=2, width=999999, sort_keys=false)}}
  336. # The thumbnail configuration for the media repository.
  337. # thumbnails:
  338. # # The maximum number of bytes an image can be before the thumbnailer refuses.
  339. # maxSourceBytes: 10485760 # 10MB default, 0 to disable
  340. #
  341. # # The maximum number of pixels an image can have before the thumbnailer refuses. Note that
  342. # # this only applies to image types: file types like audio and video are affected solely by
  343. # # the maxSourceBytes.
  344. # maxPixels: 32000000 # 32M default
  345. #
  346. # # The number of workers to use when generating thumbnails. Raise this number if thumbnails
  347. # # are slow to generate or timing out.
  348. # #
  349. # # Maximum memory usage = numWorkers multiplied by the maximum image source size
  350. # # Average memory usage is dependent on how many thumbnails are being generated by your users
  351. # numWorkers: 100
  352. #
  353. # # All thumbnails are generated into one of the sizes listed here. The first size is used as
  354. # # the default for when no width or height is requested. The media repository will return
  355. # # either an exact match or the next largest size of thumbnail.
  356. # sizes:
  357. # - width: 32
  358. # height: 32
  359. # - width: 96
  360. # height: 96
  361. # - width: 320
  362. # height: 240
  363. # - width: 640
  364. # height: 480
  365. # - width: 768 # This size is primarily used for audio thumbnailing.
  366. # height: 240
  367. # - width: 800
  368. # height: 600
  369. #
  370. # # To allow for thumbnails to be any size, not just in the sizes specified above, set this to
  371. # # true (default false). When enabled, whatever size requested by the client will be generated
  372. # # up to a maximum of the largest possible dimensions in the `sizes` list. For best results,
  373. # # specify only one size in the `sizes` list when this option is enabled.
  374. # dynamicSizing: false
  375. #
  376. # # The content types to thumbnail when requested. Types that are not supported by the media repo
  377. # # will not be thumbnailed (adding application/json here won't work). Clients may still not request
  378. # # thumbnails for these types - this won't make clients automatically thumbnail these file types.
  379. # types:
  380. # - "image/jpeg"
  381. # - "image/jpg"
  382. # - "image/png"
  383. # - "image/apng"
  384. # - "image/gif"
  385. # - "image/heif"
  386. # - "image/webp"
  387. # #- "image/svg+xml" # Be sure to have ImageMagick installed to thumbnail SVG files
  388. # - "audio/mpeg"
  389. # - "audio/ogg"
  390. # - "audio/wav"
  391. # - "audio/flac"
  392. # #- "video/mp4" # Be sure to have ffmpeg installed to thumbnail video files
  393. #
  394. # # Animated thumbnails can be CPU intensive to generate. To disable the generation of animated
  395. # # thumbnails, set this to false. If disabled, regular thumbnails will be returned.
  396. # allowAnimated: true
  397. #
  398. # # Default to animated thumbnails, if available
  399. # defaultAnimated: false
  400. #
  401. # # The maximum file size to thumbnail when a capable animated thumbnail is requested. If the image
  402. # # is larger than this, the thumbnail will be generated as a static image.
  403. # maxAnimateSizeBytes: 10485760 # 10MB default, 0 to disable
  404. #
  405. # # On a scale of 0 (start of animation) to 1 (end of animation), where should the thumbnailer try
  406. # # and thumbnail animated content? Defaults to 0.5 (middle of animation).
  407. # stillFrame: 0.5
  408. #
  409. # # How many days after a thumbnail is generated before it expires and is deleted. The thumbnail
  410. # # can be regenerated safely - this just helps free up some space in your datastores. Set to
  411. # # zero or negative to disable. Defaults to disabled.
  412. # expireAfterDays: 0
  413. {{ matrix_media_repo_thumbnails | to_json | from_json | to_nice_yaml(indent=2, width=999999, sort_keys=false) }}
  414. # Controls for the rate limit functionality
  415. rateLimit:
  416. # Set this to false if rate limiting is handled at a higher level or you don't want it enabled.
  417. enabled: {{ matrix_media_repo_rate_limit_enabled | to_json }}
  418. # The number of requests per second before an IP will be rate limited. Must be a whole number.
  419. requestsPerSecond: {{ matrix_media_repo_rate_limit_requests_per_second | to_json }}
  420. # The number of requests an IP can send at once before the rate limit is actually considered.
  421. burst: {{ matrix_media_repo_rate_limit_burst | to_json }}
  422. # Identicons are generated avatars for a given username. Some clients use these to give users a
  423. # default avatar after signing up. Identicons are not part of the official matrix spec, therefore
  424. # this feature is completely optional.
  425. identicons:
  426. enabled: {{ matrix_media_repo_identicons_enabled | to_json }}
  427. # The quarantine media settings.
  428. quarantine:
  429. # If true, when a thumbnail of quarantined media is requested an image will be returned. If no
  430. # image is given in the thumbnailPath below then a generated image will be provided. This does
  431. # not affect regular downloads of files.
  432. replaceThumbnails: {{ matrix_media_repo_quarantine_replace_thumbnails | to_json }}
  433. # If true, when media which has been quarantined is requested an image will be returned. If
  434. # no image is given in the thumbnailPath below then a generated image will be provided. This
  435. # will replace media which is not an image (ie: quarantining a PDF will replace the PDF with
  436. # an image).
  437. replaceDownloads: {{ matrix_media_repo_quarantine_replace_downloads | to_json }}
  438. # If provided, the given image will be returned as a thumbnail for media that is quarantined.
  439. #thumbnailPath: "/path/to/thumbnail.png"
  440. thumbnailPath: {{ "" if matrix_media_repo_quarantine_thumbnail_path == "" else matrix_media_repo_quarantine_thumbnail_path | to_json }}
  441. # If true, administrators of the configured homeservers may quarantine media for their server
  442. # only. Global administrators can quarantine any media (local or remote) regardless of this
  443. # flag.
  444. allowLocalAdmins: {{ matrix_media_repo_quarantine_allow_local_admins | to_json }}
  445. # The various timeouts that the media repo will use.
  446. timeouts:
  447. # The maximum amount of time the media repo should spend trying to fetch a resource that is
  448. # being previewed.
  449. urlPreviewTimeoutSeconds: {{ matrix_media_repo_timeouts_url_preview_timeout_seconds | to_json }}
  450. # The maximum amount of time the media repo will spend making remote requests to other repos
  451. # or homeservers. This is primarily used to download media.
  452. federationTimeoutSeconds: {{ matrix_media_repo_timeouts_federation_timeout_seconds | to_json }}
  453. # The maximum amount of time the media repo will spend talking to your configured homeservers.
  454. # This is usually used to verify a user's identity.
  455. clientServerTimeoutSeconds: {{ matrix_media_repo_timeouts_client_server_timeout_seconds | to_json }}
  456. # Prometheus metrics configuration
  457. # For an example Grafana dashboard, import the following JSON:
  458. # https://github.com/turt2live/matrix-media-repo/blob/master/docs/grafana.json
  459. metrics:
  460. # If true, the bindAddress and port below will serve GET /metrics for Prometheus to scrape.
  461. enabled: {{ matrix_media_repo_metrics_enabled | to_json }}
  462. # The address to listen on. Typically "127.0.0.1" or "0.0.0.0" for all interfaces.
  463. bindAddress: {{ matrix_media_repo_metrics_bind_address | to_json }}
  464. # The port to listen on. Cannot be the same as the general web server port.
  465. port: {{ matrix_media_repo_metrics_port | to_json }}
  466. # Plugins are optional pieces of the media repo used to extend the functionality offered.
  467. # Currently there are only antispam plugins, but in future there should be more options.
  468. # Plugins are not supported on per-domain paths and are instead repo-wide. For more
  469. # information on writing plugins, please visit #matrix-media-repo:t2bot.io on Matrix.
  470. # An example OCR plugin to block images with certain text. Note that the Docker image
  471. # for the media repo automatically ships this at /plugins/plugin_antispam_ocr
  472. # - exec: /plugins/plugin_antispam_ocr
  473. # config:
  474. # # The URL to your OCR server (https://github.com/otiai10/ocrserver)
  475. # ocrServer: "http://localhost:8080"
  476. # # The keywords to scan for. The image must contain at least one of the keywords
  477. # # from each list to qualify for spam.
  478. # keywordGroups:
  479. # - - elon
  480. # - musk
  481. # - elonmusk
  482. # - - bitcoin
  483. # # The minimum (and maximum) sizes of images to process.
  484. # minSizeBytes: 20000
  485. # maxSizeBytes: 200000
  486. # # The types of files to process
  487. # types: ["image/png", "image/jpeg", "image/jpg"]
  488. # # The user ID regex to check against
  489. # userIds: "@telegram_.*"
  490. # # How much of the image's height, starting from the top, to consider before
  491. # # discarding the rest. Set to 1.0 to consider the whole image.
  492. # percentageOfHeight: 0.35
  493. {{ matrix_media_repo_plugins | to_json | from_json | to_nice_yaml(indent=2, width=999999, sort_keys=false) }}
  494. # Options for controlling various MSCs/unstable features of the media repo
  495. # Sections of this config might disappear or be added over time. By default all
  496. # features are disabled in here and must be explicitly enabled to be used.
  497. # featureSupport:
  498. # # MSC2248 - Blurhash
  499. # MSC2448:
  500. # # Whether or not this MSC is enabled for use in the media repo
  501. # enabled: false
  502. #
  503. # # Maximum dimensions for converting a blurhash to an image. When no width and
  504. # # height options are supplied, the default will be half these values.
  505. # maxWidth: 1024
  506. # maxHeight: 1024
  507. #
  508. # # Thumbnail size in pixels to use to generate the blurhash string
  509. # thumbWidth: 64
  510. # thumbHeight: 64
  511. #
  512. # # The X and Y components to use. Higher numbers blur less, lower numbers blur more.
  513. # xComponents: 4
  514. # yComponents: 3
  515. #
  516. # # The amount of contrast to apply when converting a blurhash to an image. Lower values
  517. # # make the effect more subtle, larger values make it stronger.
  518. # punch: 1
  519. #
  520. # # IPFS Support
  521. # # This is currently experimental and might not work at all.
  522. # IPFS:
  523. # # Whether or not IPFS support is enabled for use in the media repo.
  524. # enabled: false
  525. #
  526. # # Options for the built in IPFS daemon
  527. # builtInDaemon:
  528. # # Enable this to spawn an in-process IPFS node to use instead of a localhost
  529. # # HTTP agent. If this is disabled, the media repo will assume you have an HTTP
  530. # # IPFS agent running and accessible. Defaults to using a daemon (true).
  531. # enabled: true
  532. #
  533. # # If the Daemon is enabled, set this to the location where the IPFS files should
  534. # # be stored. If you're using Docker, this should be something like "/data/ipfs"
  535. # # so it can be mapped to a volume.
  536. # repoPath: "./ipfs"
  537. #
  538. # # Support for redis as a cache mechanism
  539. # #
  540. # # Note: Enabling Redis support will mean that the existing cache mechanism will do nothing.
  541. # # It can be safely disabled once Redis support is enabled.
  542. # #
  543. # # See docs/redis.md for more information on how this works and how to set it up.
  544. # redis:
  545. # # Whether or not use Redis instead of in-process caching.
  546. # enabled: false
  547. #
  548. # # The Redis shards that should be used by the media repo in the ring. The names of the
  549. # # shards are for your reference and have no bearing on the connection, but must be unique.
  550. # shards:
  551. # - name: "server1"
  552. # addr: ":7000"
  553. # - name: "server2"
  554. # addr: ":7001"
  555. # - name: "server3"
  556. # addr: ":7002"
  557. {{ matrix_media_repo_feature_support | to_json | from_json | to_nice_yaml(indent=2, width=999999, sort_keys=false) }}
  558. # Optional sentry (https://sentry.io/) configuration for the media repo
  559. sentry:
  560. # Whether or not to set up error reporting. Defaults to off.
  561. enabled: {{ matrix_media_repo_sentry_enabled | to_json }}
  562. # Get this value from the setup instructions in Sentry
  563. dsn: {{ matrix_media_repo_sentry_dsn | to_json }}
  564. # Optional environment flag. Defaults to an empty string.
  565. environment: {{ "" if matrix_media_repo_sentry_environment == "" else matrix_media_repo_sentry_environment | to_json }}
  566. # Whether or not to turn on sentry's built in debugging. This will increase log output.
  567. debug: {{ matrix_media_repo_sentry_debug | to_json }}