mirror of
https://git.envs.net/envs/matrix-conf.git
synced 2024-10-01 07:35:35 -04:00
update synpase worker conf
This commit is contained in:
parent
cceda0179d
commit
6218fbb3f6
@ -2740,7 +2740,7 @@ opentracing:
|
||||
## Workers ##
|
||||
|
||||
worker_app: synapse.app.homeserver
|
||||
#worker_name: homeserver
|
||||
#worker_name: synapse
|
||||
|
||||
notify_appservices: false
|
||||
start_pushers: false
|
||||
@ -2778,6 +2778,9 @@ instance_map:
|
||||
generic_worker2:
|
||||
host: localhost
|
||||
port: 9095
|
||||
generic_worker3:
|
||||
host: localhost
|
||||
port: 9096
|
||||
|
||||
# Experimental: When using workers you can define which workers should
|
||||
# handle event persistence and typing notifications. Any worker
|
||||
@ -2790,6 +2793,7 @@ stream_writers:
|
||||
events:
|
||||
- generic_worker1
|
||||
- generic_worker2
|
||||
- generic_worker3
|
||||
# typing: worker1
|
||||
|
||||
# The worker that is used to run background tasks (e.g. cleaning up expired
|
||||
|
28
etc/matrix-synapse/workers/generic_worker4.yaml
Normal file
28
etc/matrix-synapse/workers/generic_worker4.yaml
Normal file
@ -0,0 +1,28 @@
|
||||
worker_app: synapse.app.generic_worker
|
||||
worker_name: generic_worker4
|
||||
|
||||
# The replication listener on the synapse to talk to.
|
||||
worker_replication_host: 127.0.0.1
|
||||
worker_replication_http_port: 9093
|
||||
|
||||
worker_log_config: /etc/matrix-synapse/workers/generic_worker4_log_config.yaml
|
||||
|
||||
worker_listeners:
|
||||
- type: http
|
||||
bind_addresses: ['127.0.0.1']
|
||||
port: 8513
|
||||
tls: false
|
||||
x_forwarded: true
|
||||
resources:
|
||||
- names: [client, federation]
|
||||
compress: false
|
||||
|
||||
- type: http
|
||||
bind_addresses: ['127.0.0.1']
|
||||
port: 9097
|
||||
resources:
|
||||
- names: [replication]
|
||||
|
||||
- type: metrics
|
||||
bind_addresses: ['0.0.0.0']
|
||||
port: 9134
|
42
etc/matrix-synapse/workers/generic_worker4_log_config.yaml
Normal file
42
etc/matrix-synapse/workers/generic_worker4_log_config.yaml
Normal file
@ -0,0 +1,42 @@
|
||||
version: 1
|
||||
|
||||
formatters:
|
||||
precise:
|
||||
format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s - %(message)s'
|
||||
|
||||
filters:
|
||||
context:
|
||||
(): synapse.util.logcontext.LoggingContextFilter
|
||||
request: ""
|
||||
|
||||
handlers:
|
||||
file:
|
||||
class: logging.handlers.RotatingFileHandler
|
||||
formatter: precise
|
||||
filename: /var/log/matrix-synapse/worker_generic_worker4.log
|
||||
maxBytes: 104857600
|
||||
backupCount: 5
|
||||
filters: [context]
|
||||
encoding: utf8
|
||||
console:
|
||||
class: logging.StreamHandler
|
||||
formatter: precise
|
||||
filters: [context]
|
||||
|
||||
loggers:
|
||||
synapse:
|
||||
level: WARN
|
||||
|
||||
synapse.storage.SQL:
|
||||
# beware: increasing this to DEBUG will make synapse log sensitive
|
||||
# information such as access tokens.
|
||||
level: WARN
|
||||
|
||||
root:
|
||||
level: WARN
|
||||
handlers: [file, console]
|
||||
|
||||
precise:
|
||||
format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s - %(message)s'
|
||||
|
||||
disable_existing_loggers: false
|
@ -7,5 +7,7 @@ synchrotrons:
|
||||
pid_file: /etc/matrix-synapse/workers/generic_worker2.pid
|
||||
- address: localhost:8512
|
||||
pid_file: /etc/matrix-synapse/workers/generic_worker3.pid
|
||||
- address: localhost:8513
|
||||
pid_file: /etc/matrix-synapse/workers/generic_worker4.pid
|
||||
balancer:
|
||||
interval: 2
|
||||
|
@ -24,22 +24,19 @@ map $http_origin $DO_CORS {
|
||||
}
|
||||
|
||||
|
||||
upstream generic_worker_rr {
|
||||
server localhost:8510;
|
||||
server localhost:8511;
|
||||
server localhost:8512;
|
||||
}
|
||||
upstream generic_worker_ih {
|
||||
ip_hash;
|
||||
server localhost:8510;
|
||||
server localhost:8511;
|
||||
server localhost:8512;
|
||||
server localhost:8513;
|
||||
}
|
||||
upstream generic_worker_lc {
|
||||
least_conn;
|
||||
server localhost:8510;
|
||||
server localhost:8511;
|
||||
server localhost:8512;
|
||||
server localhost:8513;
|
||||
}
|
||||
|
||||
|
||||
@ -52,13 +49,15 @@ server {
|
||||
|
||||
## well-known
|
||||
location /.well-known/matrix/support {
|
||||
add_header Access-Control-Allow-Origin "$DO_CORS";
|
||||
# add_header Access-Control-Allow-Origin "$DO_CORS";
|
||||
add_header Access-Control-Allow-Origin "*";
|
||||
add_header Content-Type application/json;
|
||||
return 200 '{"admins": [{"matrix_id": "@creme:envs.net", "email_address": "hostmaster@envs.net", "role": "admin"}]}';
|
||||
}
|
||||
|
||||
location /.well-known/matrix/ {
|
||||
add_header Access-Control-Allow-Origin "$DO_CORS";
|
||||
# add_header Access-Control-Allow-Origin "$DO_CORS";
|
||||
add_header Access-Control-Allow-Origin "*";
|
||||
add_header Content-Type application/json;
|
||||
return 200 '{"m.server": "matrix.envs.net:443", "m.homeserver": {"base_url": "https://matrix.envs.net"}}';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user