mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2026-03-26 06:27:23 +00:00
allow synapse to use redis unix socket instead of tcp
This commit is contained in:
@@ -1241,11 +1241,16 @@ matrix_synapse_instance_map: |
|
||||
|
||||
# Redis information
|
||||
matrix_synapse_redis_enabled: false
|
||||
matrix_synapse_redis_host: ""
|
||||
matrix_synapse_redis_port: 6379
|
||||
matrix_synapse_redis_password: ""
|
||||
matrix_synapse_redis_dbid: 0
|
||||
matrix_synapse_redis_use_tls: false
|
||||
# Connection option 1: TCP
|
||||
matrix_synapse_redis_host: ""
|
||||
matrix_synapse_redis_port: 6379
|
||||
# Connection option 2: Unix socket (takes precedence over TCP if `matrix_synapse_redis_path` is set)
|
||||
matrix_synapse_redis_path_enabled: false
|
||||
matrix_synapse_redis_path: "" # the path to the redis socket inside the container, e.g. "/var/run/redis.sock"
|
||||
matrix_synapse_redis_path_host: "" # the path to the redis socket on the host, e.g. "/matrix/valkey/run/valkey.sock"
|
||||
|
||||
# Controls whether Synapse starts a replication listener necessary for workers.
|
||||
#
|
||||
|
||||
@@ -2932,6 +2932,11 @@ redis:
|
||||
host: {{ matrix_synapse_redis_host | to_json }}
|
||||
port: {{ matrix_synapse_redis_port | to_json }}
|
||||
|
||||
# The full path to a local Unix socket file. If this is used, host and port are ignored.
|
||||
{% if matrix_synapse_redis_path_enabled %}
|
||||
path: {{ matrix_synapse_redis_path | to_json }}
|
||||
{% endif %}
|
||||
|
||||
# Optional database ID to connect to. Defaults to 0.
|
||||
dbid: {{ matrix_synapse_redis_dbid | to_json }}
|
||||
|
||||
|
||||
@@ -67,6 +67,9 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
|
||||
{% for volume in matrix_synapse_container_additional_volumes %}
|
||||
--mount type={{ volume.type | default('bind' if '/' in volume.src else 'volume') }},src={{ volume.src }},dst={{ volume.dst }}{{ (',' + volume.options) if volume.options else '' }} \
|
||||
{% endfor %}
|
||||
{% if matrix_synapse_redis_path_enabled %}
|
||||
--mount type=bind,src={{ matrix_synapse_redis_path_host }},dst={{ matrix_synapse_redis_path }} \
|
||||
{% endif %}
|
||||
--label-file={{ matrix_synapse_base_path }}/{{ matrix_synapse_worker_labels_file_name }} \
|
||||
{% for arg in matrix_synapse_container_arguments %}
|
||||
{{ arg }} \
|
||||
|
||||
@@ -51,6 +51,9 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
|
||||
{% endif %}
|
||||
--mount type=bind,src={{ matrix_synapse_config_dir_path }},dst=/data,ro \
|
||||
--mount type=bind,src={{ matrix_synapse_storage_path }},dst=/matrix-media-store-parent,bind-propagation=slave \
|
||||
{% if matrix_synapse_redis_path_enabled %}
|
||||
--mount type=bind,src={{ matrix_synapse_redis_path_host }},dst={{ matrix_synapse_redis_path }} \
|
||||
{% endif %}
|
||||
--label-file={{ matrix_synapse_base_path }}/labels \
|
||||
{% for volume in matrix_synapse_container_additional_volumes %}
|
||||
--mount type={{ volume.type | default('bind' if '/' in volume.src else 'volume') }},src={{ volume.src }},dst={{ volume.dst }}{{ (',' + volume.options) if volume.options else '' }} \
|
||||
|
||||
Reference in New Issue
Block a user