Procházet zdrojové kódy

Switch matrix_dendrite_container_additional_volumes from using -v to --mount

Related to e5130372b9.

Depending on the `options` that people provide, this may break
compatibility.
pull/3093/head
Slavi Pantaleev před 2 roky
rodič
revize
881c20bf25
2 změnil soubory, kde provedl 3 přidání a 7 odebrání
  1. +2
    -6
      roles/custom/matrix-dendrite/defaults/main.yml
  2. +1
    -1
      roles/custom/matrix-dendrite/templates/systemd/matrix-dendrite.service.j2

+ 2
- 6
roles/custom/matrix-dendrite/defaults/main.yml Zobrazit soubor

@@ -215,12 +215,8 @@ matrix_dendrite_client_api_recaptcha_sitekey_class: ""

# A list of additional "volumes" to mount in the container.
# This list gets populated dynamically based on Dendrite 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_dendrite_container_extra_arguments`.
# Example: `matrix_dendrite_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_dendrite_container_additional_volumes: []

# A list of appservice config files (in-container filesystem paths).


+ 1
- 1
roles/custom/matrix-dendrite/templates/systemd/matrix-dendrite.service.j2 Zobrazit soubor

@@ -42,7 +42,7 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
--mount type=bind,src={{ matrix_dendrite_nats_storage_path }},dst=/matrix-nats-store,bind-propagation=slave \
--label-file={{ matrix_dendrite_base_path }}/labels \
{% for volume in matrix_dendrite_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_dendrite_container_arguments %}
{{ arg }} \


Načítá se…
Zrušit
Uložit