forked from matrix-org/sygnal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sygnal.yaml.sample
211 lines (188 loc) · 5.32 KB
/
sygnal.yaml.sample
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
##
# This is a configuration for Sygnal, the reference Push Gateway for Matrix
# See: matrix.org
##
# The 'database' setting defines the database that sygnal uses to store all of
# its data.
#
# 'name' gives the database engine to use: either 'sqlite3' (for SQLite) or
# 'psycopg2' (for PostgreSQL).
#
# 'args' gives options which are passed through to the database engine,
# except for options starting 'cp_', which are used to configure the Twisted
# connection pool. For a reference to valid arguments, see:
# * for sqlite: https://docs.python.org/3/library/sqlite3.html#sqlite3.connect
# * for postgres: https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS
# * for the connection pool: https://twistedmatrix.com/documents/current/api/twisted.enterprise.adbapi.ConnectionPool.html#__init__
#
#
# Example SQLite configuration:
#
#database:
# name: sqlite3
# args:
# dbfile: /path/to/database.db
#
#
# Example Postgres configuration:
#
#database:
# name: psycopg2
# args:
# host: localhost
# database: sygnal
# user: sygnal
# password: pass
# cp_min: 1
# cp_max: 5
#
database:
name: sqlite3
args:
dbfile: sygnal.db
## Logging #
#
log:
# Specify a Python logging 'dictConfig', as described at:
# https://docs.python.org/3.7/library/logging.config.html#logging.config.dictConfig
#
setup:
version: 1
formatters:
normal:
format: "%(asctime)s [%(process)d] %(levelname)-5s %(name)s %(message)s"
handlers:
# This handler prints to Standard Error
#
stderr:
class: "logging.StreamHandler"
formatter: "normal"
stream: "ext://sys.stderr"
# This handler prints to Standard Output.
#
stdout:
class: "logging.StreamHandler"
formatter: "normal"
stream: "ext://sys.stdout"
# This handler demonstrates logging to a text file on the filesystem.
# You can use logrotate(8) to perform log rotation.
#
file:
class: "logging.handlers.WatchedFileHandler"
formatter: "normal"
filename: "./sygnal.log"
loggers:
# sygnal.access contains the access logging lines.
# Comment out this section if you don't want to give access logging
# any special treatment.
#
sygnal.access:
propagate: false
handlers: ["stdout"]
level: "INFO"
# sygnal contains log lines from Sygnal itself.
# You can comment out this section to fall back to the root logger.
#
sygnal:
propagate: false
handlers: ["stderr", "file"]
root:
# Specify the handler(s) to send log messages to.
handlers: ["stderr"]
level: "INFO"
disable_existing_loggers: false
access:
# Specify whether or not to trust the IP address in the `X-Forwarded-For`
# header. In general, you want to enable this if and only if you are using a
# reverse proxy which is configured to emit it.
#
x_forwarded_for: false
## HTTP Server (Matrix Push Gateway API) #
#
http:
# Specify a list of interface addresses to bind to.
#
# This example listens on the IPv4 loopback device:
bind_addresses: ['127.0.0.1']
# This example listens on all IPv4 interfaces:
#bind_addresses: ['0.0.0.0']
# This example listens on all IPv4 and IPv6 interfaces:
#bind_addresses: ['0.0.0.0', '::']
# Specify the port number to listen on.
#
port: 5000
## Metrics #
#
metrics:
## Prometheus #
#
prometheus:
# Specify whether or not to enable Prometheus.
#
enabled: false
# Specify an address for the Prometheus HTTP Server to listen on.
#
address: '127.0.0.1'
# Specify a port for the Prometheus HTTP Server to listen on.
#
port: 8000
## OpenTracing #
#
opentracing:
# Specify whether or not to enable OpenTracing.
#
enabled: false
# Specify an implementation of OpenTracing to use. Currently only 'jaeger'
# is supported.
#
implementation: jaeger
# Specify the service name to be reported to the tracer.
#
service_name: sygnal
# Specify configuration values to pass to jaeger_client.
#
jaeger:
sampler:
type: 'const'
param: 1
# local_agent:
# reporting_host: '127.0.0.1'
# reporting_port:
logging: true
## Sentry #
#
sentry:
# Specify whether or not to enable Sentry.
#
enabled: false
# Specify your Sentry DSN if you enable Sentry
#
#dsn: "https://<key>@sentry.example.org/<project>"
## Pushkins/Apps #
#
# Add a section for every push application here.
# Specify the pushkey for the application and also the type.
# For the type, you may specify a fully-qualified Python classname if desired.
#
apps:
# This is an example APNs push configuration using certificate authentication.
#
#com.example.myapp.ios:
# type: apns
# certfile: com.example.myApp_prod_APNS.pem
# This is an example APNs push configuration using key authentication.
#
#com.example.myapp2.ios:
# type: apns
# keyfile: my_key.p8
# key_id: MY_KEY_ID
# team_id: MY_TEAM_ID
# topic: MY_TOPIC
# This is an example GCM/FCM push configuration.
#
#com.example.myapp.android:
# type: gcm
# api_key: your_api_key_for_gcm
# # This is the maximum number of connections to GCM servers at any one time
# # the default is 20.
# #max_connections: 20