Kaynağa Gözat

Switch matrix_synapse_container_additional_volumes from using -v to --mount

Depending on the `options` that people provide, this may break
compatibility.
pull/3093/head
Slavi Pantaleev 2 yıl önce
ebeveyn
işleme
e5130372b9
3 değiştirilmiş dosya ile 4 ekleme ve 8 silme
  1. +2
    -6
      roles/custom/matrix-synapse/defaults/main.yml
  2. +1
    -1
      roles/custom/matrix-synapse/templates/synapse/systemd/matrix-synapse-worker.service.j2
  3. +1
    -1
      roles/custom/matrix-synapse/templates/synapse/systemd/matrix-synapse.service.j2

+ 2
- 6
roles/custom/matrix-synapse/defaults/main.yml Dosyayı Görüntüle

@@ -526,12 +526,8 @@ matrix_synapse_oidc_providers: []

# A list of additional "volumes" to mount in the container.
# This list gets populated dynamically based on Synapse extensions that have been enabled.
# Contains definition objects like this: `{"src": "/outside", "dst": "/inside", "options": "rw|ro|slave|.."}
#
# Note: internally, this uses the `-v` flag for mounting the specified volumes.
# It's better (safer) to use the `--mount` flag for mounting volumes.
# To use `--mount`, specify it in `matrix_synapse_container_extra_arguments`.
# Example: `matrix_synapse_container_extra_arguments: ['--mount type=bind,src=/outside,dst=/inside,ro']
# Contains definition objects like this: `{"src": "/outside", "dst": "/inside", "options": "ro"}
# Note: internally, this uses the `--mount` flag for mounting the specified volumes.
matrix_synapse_container_additional_volumes: []

# A list of additional loggers to register in synapse.log.config.


+ 1
- 1
roles/custom/matrix-synapse/templates/synapse/systemd/matrix-synapse-worker.service.j2 Dosyayı Görüntüle

@@ -40,7 +40,7 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
--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 \
{% for volume in matrix_synapse_container_additional_volumes %}
-v {{ volume.src }}:{{ volume.dst }}:{{ volume.options }} \
--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 %}
{% for arg in matrix_synapse_container_arguments %}
{{ arg }} \


+ 1
- 1
roles/custom/matrix-synapse/templates/synapse/systemd/matrix-synapse.service.j2 Dosyayı Görüntüle

@@ -58,7 +58,7 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
--mount type=bind,src={{ matrix_synapse_storage_path }},dst=/matrix-media-store-parent,bind-propagation=slave \
--label-file={{ matrix_synapse_base_path }}/labels \
{% for volume in matrix_synapse_container_additional_volumes %}
-v {{ volume.src }}:{{ volume.dst }}:{{ volume.options }} \
--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 %}
{% for arg in matrix_synapse_container_arguments %}
{{ arg }} \


Yükleniyor…
İptal
Kaydet