mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2026-03-26 06:27:23 +00:00
matrix-authentication-service: add UNIX socket support for playbook-managed Postgres
MAS now connects to the playbook-managed Postgres via a UNIX socket by default (when available), matching the approach already used by Synapse. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -300,6 +300,15 @@ matrix_authentication_service_config_database_idle_timeout: 600
|
||||
# Controls the `database.max_lifetime` configuration setting.
|
||||
matrix_authentication_service_config_database_max_lifetime: 1800
|
||||
|
||||
# Controls whether the database connection is made via a UNIX socket.
|
||||
matrix_authentication_service_config_database_socket_enabled: false
|
||||
|
||||
# The path to the Postgres socket's parent directory inside the MAS container.
|
||||
matrix_authentication_service_config_database_socket_path: "/run-postgres"
|
||||
|
||||
# The path to the Postgres socket directory on the host (bind-mount source).
|
||||
matrix_authentication_service_config_database_socket_path_host: ""
|
||||
|
||||
########################################################################################
|
||||
# #
|
||||
# /Database configuration #
|
||||
|
||||
@@ -71,7 +71,10 @@
|
||||
--mount type=bind,src={{ matrix_authentication_service_config_path }}/config.yaml,dst=/config.yaml,ro
|
||||
--mount type=bind,src={{ matrix_authentication_service_data_keys_path }},dst=/keys,ro
|
||||
--mount type=bind,src={{ matrix_authentication_service_syn2mas_synapse_homeserver_config_path }},dst=/homeserver.yaml,ro
|
||||
{% if matrix_authentication_service_syn2mas_synapse_database_socket_enabled %}
|
||||
{% if matrix_authentication_service_config_database_socket_enabled %}
|
||||
--mount type=bind,src={{ matrix_authentication_service_config_database_socket_path_host }},dst={{ matrix_authentication_service_config_database_socket_path }}
|
||||
{% endif %}
|
||||
{% if matrix_authentication_service_syn2mas_synapse_database_socket_enabled and (not matrix_authentication_service_config_database_socket_enabled or matrix_authentication_service_syn2mas_synapse_database_socket_path != matrix_authentication_service_config_database_socket_path) %}
|
||||
--mount type=bind,src={{ matrix_authentication_service_syn2mas_synapse_database_socket_path_host }},dst={{ matrix_authentication_service_syn2mas_synapse_database_socket_path }}
|
||||
{% endif %}
|
||||
{{ matrix_authentication_service_container_image }}
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
- {'name': 'matrix_authentication_service_hostname', when: true}
|
||||
- {'name': 'matrix_authentication_service_config_database_username', when: true}
|
||||
- {'name': 'matrix_authentication_service_config_database_password', when: true}
|
||||
- {'name': 'matrix_authentication_service_config_database_host', when: true}
|
||||
- {'name': 'matrix_authentication_service_config_database_host', when: "{{ not matrix_authentication_service_config_database_socket_enabled }}"}
|
||||
- {'name': 'matrix_authentication_service_config_database_socket_path_host', when: "{{ matrix_authentication_service_config_database_socket_enabled }}"}
|
||||
- {'name': 'matrix_authentication_service_config_database_database', when: true}
|
||||
- {'name': 'matrix_authentication_service_config_secrets_encryption', when: true}
|
||||
- {'name': 'matrix_authentication_service_config_matrix_homeserver', when: true}
|
||||
|
||||
@@ -28,6 +28,9 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
|
||||
--label-file={{ matrix_authentication_service_config_path }}/labels \
|
||||
--mount type=bind,src={{ matrix_authentication_service_config_path }}/config.yaml,dst=/config.yaml,ro \
|
||||
--mount type=bind,src={{ matrix_authentication_service_data_keys_path }},dst=/keys,ro \
|
||||
{% if matrix_authentication_service_config_database_socket_enabled %}
|
||||
--mount type=bind,src={{ matrix_authentication_service_config_database_socket_path_host }},dst={{ matrix_authentication_service_config_database_socket_path }} \
|
||||
{% endif %}
|
||||
{% for arg in matrix_authentication_service_container_extra_arguments %}
|
||||
{{ arg }} \
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user