diff options
author | Alex Auvolat <alex@adnab.me> | 2021-12-30 13:47:47 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-12-30 13:47:47 +0100 |
commit | 8d48f3bf7ff858a75ba3b2c3ef25195b445c8942 (patch) | |
tree | a21765fd87daaa8b18379c31458212c1b51e6e3a | |
parent | a6c4828cb66eb74ef2320f9fa06b59ae299e5c5f (diff) | |
download | nixcfg-8d48f3bf7ff858a75ba3b2c3ef25195b445c8942.tar.gz nixcfg-8d48f3bf7ff858a75ba3b2c3ef25195b445c8942.zip |
Use rclone-mounted garage as synapse media store
-rw-r--r-- | app/im/config/homeserver.yaml | 2 | ||||
-rw-r--r-- | app/im/config/synapse.log.config.yaml | 23 | ||||
-rw-r--r-- | app/im/deploy/im.hcl | 7 |
3 files changed, 30 insertions, 2 deletions
diff --git a/app/im/config/homeserver.yaml b/app/im/config/homeserver.yaml index 8204f14..0caacfe 100644 --- a/app/im/config/homeserver.yaml +++ b/app/im/config/homeserver.yaml @@ -804,7 +804,7 @@ database: # A yaml python logging config file as described by # https://docs.python.org/3.7/library/logging.config.html#configuration-dictionary-schema # -log_config: "/data/matrix.home.adnab.me.log.config" +log_config: "/etc/matrix-synapse/synapse.log.config.yaml" ## Ratelimiting ## diff --git a/app/im/config/synapse.log.config.yaml b/app/im/config/synapse.log.config.yaml new file mode 100644 index 0000000..0b5622e --- /dev/null +++ b/app/im/config/synapse.log.config.yaml @@ -0,0 +1,23 @@ +version: 1 + +formatters: + precise: + format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s - %(message)s' + + +handlers: + console: + class: logging.StreamHandler + formatter: precise + +loggers: + synapse.storage.SQL: + # beware: increasing this to DEBUG will make synapse log sensitive + # information such as access tokens. + level: INFO + +root: + level: INFO + handlers: [console] + +disable_existing_loggers: false diff --git a/app/im/deploy/im.hcl b/app/im/deploy/im.hcl index 3cf4e95..6378e82 100644 --- a/app/im/deploy/im.hcl +++ b/app/im/deploy/im.hcl @@ -66,7 +66,7 @@ job "im" { volumes = [ "secrets:/etc/matrix-synapse", "../alloc/data:/ephemeral", - "/mnt/ssd/synapse:/data", + "/mnt/garage-staging/synapse-data:/data", ] } @@ -76,6 +76,11 @@ job "im" { } template { + data = file("../config/synapse.log.config.yaml") + destination = "secrets/synapse.log.config.yaml" + } + + template { data = "{{ key \"secrets/synapse/signing_key\" }}" destination = "secrets/signing_key" } |