mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2026-03-25 22:17:25 +00:00
optional postgres unix socket with synapse
This commit is contained in:
@@ -1284,6 +1284,13 @@ matrix_synapse_database_cp_max: 10
|
||||
matrix_synapse_database_user: "synapse"
|
||||
matrix_synapse_database_password: ""
|
||||
matrix_synapse_database_database: "synapse"
|
||||
# Connection option 2: Unix socket (takes precedence over TCP if enabled)
|
||||
# disabled by default
|
||||
matrix_synapse_database_socket_enabled: false
|
||||
# the path to the postgres socket's parent dir inside the container (not the socket file itself).
|
||||
matrix_synapse_database_socket_path: "/tmp/postgres"
|
||||
# the path to the postgres socket on the host, e.g., "/matrix/postgres/run" (parent dir, not the socket file itself).
|
||||
matrix_synapse_database_socket_path_host: ""
|
||||
|
||||
matrix_synapse_turn_uris: []
|
||||
matrix_synapse_turn_shared_secret: ""
|
||||
|
||||
@@ -864,7 +864,7 @@ database:
|
||||
user: {{ matrix_synapse_database_user | string|to_json }}
|
||||
password: {{ matrix_synapse_database_password | string|to_json }}
|
||||
database: "{{ matrix_synapse_database_database }}"
|
||||
host: "{{ matrix_synapse_database_host }}"
|
||||
host: "{{ matrix_synapse_database_socket_path if matrix_synapse_database_socket_enabled else matrix_synapse_database_host }}"
|
||||
port: {{ matrix_synapse_database_port }}
|
||||
cp_min: {{ matrix_synapse_database_cp_min | to_json }}
|
||||
cp_max: {{ matrix_synapse_database_cp_max | to_json }}
|
||||
|
||||
@@ -70,6 +70,9 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
|
||||
{% if matrix_synapse_redis_path_enabled %}
|
||||
--mount type=bind,src={{ matrix_synapse_redis_path_host }},dst={{ matrix_synapse_redis_path }} \
|
||||
{% endif %}
|
||||
{% if matrix_synapse_database_socket_enabled %}
|
||||
--mount type=bind,src={{ matrix_synapse_database_socket_path_host }},dst={{ matrix_synapse_database_socket_path }} \
|
||||
{% endif %}
|
||||
--label-file={{ matrix_synapse_base_path }}/{{ matrix_synapse_worker_labels_file_name }} \
|
||||
{% for arg in matrix_synapse_container_arguments %}
|
||||
{{ arg }} \
|
||||
|
||||
@@ -54,6 +54,9 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
|
||||
{% if matrix_synapse_redis_path_enabled %}
|
||||
--mount type=bind,src={{ matrix_synapse_redis_path_host }},dst={{ matrix_synapse_redis_path }} \
|
||||
{% endif %}
|
||||
{% if matrix_synapse_database_socket_enabled %}
|
||||
--mount type=bind,src={{ matrix_synapse_database_socket_path_host }},dst={{ matrix_synapse_database_socket_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