-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathconfig.yml.sample
More file actions
130 lines (120 loc) · 5.08 KB
/
config.yml.sample
File metadata and controls
130 lines (120 loc) · 5.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
address: 0.0.0.0 # optional, defaults to 0.0.0.0
port: 8080
sentry_dsn: '' # optional sentry dsn
healthchecks: # optional healthchecks.io config
url: https://hc-ping.com/ # default healthchecks.io ping URL
uuid: # healthchecks.io UUID
public: # public-facing information
name: MRS # instance name
ui: http://localhost # UI URL
api: https://localhost:8080 # public API URL
matrix: # matrix server information
server_name: localhost # server name (!), not api url
support: # MSC1929 support file
contacts:
- matrix_id: '@admin:example.com' # matrix ID
email_address: 'admin@example.com' # email
role: 'm.role.admin' # role
support_page: 'https://example.com' # (optional) support page URL
keys: [] # keys, will be generated automatically on first run
search: # search config
defaults: # default options, if not provided by request
limit: 10
offset: 0
sort_by: '-_score' # by relevancy (desc)
highlights: # (optional) search highlights
- position: 0
id: '!IyxAXBqViWHZfUkWjh:etke.cc'
servers: ['localhost']
type: m.room
alias: '#mrs:etke.cc'
name: Search powered by Matrix Rooms Search
topic: This is example highlight
avatar: 'mxc://etke.cc/EPswbbDKYLNEjRYgEpHpRQue'
avatar_url: 'https://localhost:8080/avatar/etke.cc/EPswbbDKYLNEjRYgEpHpRQue'
server: localhost
members: 9999
language: EN
join_rule: public
guest_can_join: true
world_readable: true
auth: # auth configuration
admin: # admin configuration, for /-/* endpoints
login: admin
password: changeme
ips: # (optional) allow access to admin endpoints only from the following IPs
- 127.0.0.1
metrics: # metrics endpoints
login: metrics
password: changeme
ips: # (optional) allow access to metrics endpoint only from the following IPs
- 127.0.0.1
discovery: # (optional) protected discovery endpoint without rate limit
login: discovery
password: changeme
ips: # (optional) allow access to discovery endpoints only from the following IPs
- 127.0.0.1
moderation: # moderation endpoints
login: moderation
password: changeme
ips: # (optional) allow access to moderation endpoints only from the following IPs
- 127.0.0.1
catalog: # catalog endpoints
login: catalog
password: changeme
ips: # (optional) allow access to catalog endpoints only from the following IPs
- 127.0.0.1
cache: # (optional) cache config
max_age: 0
max_age_search: 0 # /search and /_matrix/federation/v1/publicRooms should have different max-age that aligns with full and/or index cron jobs
plausible: # (optional) plausible.io integration
host: plausible.io
domain: example.com
cron: # (optional) data jobs, using cron syntax, ref: https://github.com/mileusna/crontab#crontab-syntax-
discovery:
parsing:
indexing:
full:
path:
index: testdata/index
data: testdata/data.db
media: testdata/media
batch: # batch size of ingested data
rooms: 10000
workers: # parallelism configuration, how much workers to spin up at once
discovery: 20 # matrix server discovery, servers at once
parsing: 20 # matrix public rooms parsing, servers at once
webhooks: # optional webhooks
moderation: 'hookshot webhook url'
stats: 'hookshot webhook url'
email: # (optional) email integration, for now only for automatic reporting using MSC1929
moderation: 'moderation email address'
postmark: # only postmark is supported for now
server_token: your server token
report:
message_stream: postmark message stream ID
from: email, usually a postmark sender signature
templates: # (optional) email templates using go templates: https://pkg.go.dev/text/template
report: # report is used when sending automatic email to the server admins using MSC1929 contacts
subject: "{{ .Public.Name }}: Room {{ .RoomAliasOrID }} has been reported"
body: |-
Hello,
The room [{{ .RoomAliasOrID }}](https://matrix.to/#/{{ .RoomAliasOrID }}) has been reported on [{{ .Public.Name }}]({{ .Public.UI }}) (a [Matrix Rooms Search](https://gitlab.com/etke.cc/mrs/api) instance).
The reporter provided the following reason:
```
{{ .Reason }}
```
---
This automatic email was sent by [{{ .Public.Name }}]({{ .Public.UI }}) (a [Matrix Rooms Search](https://gitlab.com/etke.cc/mrs/api) instance) because you listed that email address as contact point (Matrix MSC1929 proposal). If you have any questions - please, use the [{{ .Public.Name }}]({{ .Public.UI }}) website.
languages: # (optional) list of supported languages in ISO 639-1 format. if first element is "ALL" - all models will be loaded
- EN
- DE
# bootstrap list of servers, each of them will be discovered and if server doesn't respond, it won't be parsed
servers:
- etke.cc
# blocklist config
blocklist:
ips: [] # list of IPs and CIDRs to reject requests from completely
servers: [] # list of servers to ignore completely (regular expressions)
queries: [] # list of words, if at least one of them is present in a search query, empty results will be returned
# vi: ft=yaml