Extract matrix config to file, make sure everything still works as before
This commit is contained in:
parent
fb0efacf40
commit
fff9f1e9da
1032
roles/docker/files/configs/matrix/homeserver.yaml
Normal file
1032
roles/docker/files/configs/matrix/homeserver.yaml
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,37 @@
|
||||||
|
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: /data/homeserver.log
|
||||||
|
maxBytes: 104857600
|
||||||
|
backupCount: 10
|
||||||
|
filters: [context]
|
||||||
|
encoding: utf8
|
||||||
|
console:
|
||||||
|
class: logging.StreamHandler
|
||||||
|
formatter: precise
|
||||||
|
filters: [context]
|
||||||
|
|
||||||
|
loggers:
|
||||||
|
synapse:
|
||||||
|
level: INFO
|
||||||
|
|
||||||
|
synapse.storage.SQL:
|
||||||
|
# beware: increasing this to DEBUG will make synapse log sensitive
|
||||||
|
# information such as access tokens.
|
||||||
|
level: INFO
|
||||||
|
|
||||||
|
root:
|
||||||
|
level: INFO
|
||||||
|
handlers: [file, console]
|
|
@ -3,11 +3,20 @@
|
||||||
file:
|
file:
|
||||||
name: "{{ matrix.volume_folder }}/{{ volume }}"
|
name: "{{ matrix.volume_folder }}/{{ volume }}"
|
||||||
state: directory
|
state: directory
|
||||||
|
owner: "991"
|
||||||
|
group: "991"
|
||||||
loop:
|
loop:
|
||||||
- "db"
|
- "data"
|
||||||
|
- "data/uploads"
|
||||||
|
- "data/media"
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: volume
|
loop_var: volume
|
||||||
|
|
||||||
|
- name: create matrix DB folder
|
||||||
|
file:
|
||||||
|
name: "{{ matrix.volume_folder }}/db"
|
||||||
|
state: "directory"
|
||||||
|
|
||||||
- name: create riot volume folders
|
- name: create riot volume folders
|
||||||
file:
|
file:
|
||||||
name: "{{ riot.volume_folder }}/{{ volume }}"
|
name: "{{ riot.volume_folder }}/{{ volume }}"
|
||||||
|
@ -41,6 +50,16 @@
|
||||||
src: files/configs/matrix/vhost-matrix
|
src: files/configs/matrix/vhost-matrix
|
||||||
dest: "{{ nginx.volume_folder }}/vhost/{{ matrix.domain }}"
|
dest: "{{ nginx.volume_folder }}/vhost/{{ matrix.domain }}"
|
||||||
|
|
||||||
|
- name: upload homeserver.yaml
|
||||||
|
template:
|
||||||
|
src: "files/configs/matrix/homeserver.yaml"
|
||||||
|
dest: "{{ matrix.volume_folder }}/data/homeserver.yaml"
|
||||||
|
|
||||||
|
- name: upload matrix logging config
|
||||||
|
template:
|
||||||
|
src: "files/configs/matrix/matrix.data.coop.log.config"
|
||||||
|
dest: "{{ matrix.volume_folder }}/data/matrix.data.coop.log.config"
|
||||||
|
|
||||||
- name: matrix database container
|
- name: matrix database container
|
||||||
docker_container:
|
docker_container:
|
||||||
name: matrix_db
|
name: matrix_db
|
||||||
|
@ -67,14 +86,8 @@
|
||||||
volumes:
|
volumes:
|
||||||
- "{{ matrix.volume_folder }}/data:/data"
|
- "{{ matrix.volume_folder }}/data:/data"
|
||||||
env:
|
env:
|
||||||
SYNAPSE_SERVER_NAME: "{{ base_domain }}"
|
SYNAPSE_CONFIG_PATH: "/data/homeserver.yaml"
|
||||||
SYNAPSE_REPORT_STATS: "False"
|
SYNAPSE_LOG_LEVEL: "INFO"
|
||||||
SYNAPSE_ENABLE_REGISTRATION: "True"
|
|
||||||
SYNAPSE_LOG_LEVEL: "ERROR"
|
|
||||||
SYNAPSE_NO_TLS: "1"
|
|
||||||
POSTGRES_HOST: "matrix_db"
|
|
||||||
POSTGRES_USER: "synapse"
|
|
||||||
POSTGRES_PASSWORD: "{{ postgres_passwords.matrix }}"
|
|
||||||
VIRTUAL_HOST: "{{ matrix.domain }}"
|
VIRTUAL_HOST: "{{ matrix.domain }}"
|
||||||
VIRTUAL_PORT: "8008"
|
VIRTUAL_PORT: "8008"
|
||||||
LETSENCRYPT_HOST: "{{ matrix.domain }}"
|
LETSENCRYPT_HOST: "{{ matrix.domain }}"
|
||||||
|
|
Loading…
Reference in a new issue