Просмотр исходного кода

Add support for mounting additional volumes to matrix-coturn

pull/126/head
Slavi Pantaleev 7 лет назад
Родитель
Сommit
018aeed5e9
2 измененных файлов: 9 добавлений и 0 удалений
  1. +6
    -0
      roles/matrix-coturn/defaults/main.yml
  2. +3
    -0
      roles/matrix-coturn/templates/systemd/matrix-coturn.service.j2

+ 6
- 0
roles/matrix-coturn/defaults/main.yml Просмотреть файл

@@ -17,6 +17,12 @@ matrix_coturn_config_path: "{{ matrix_coturn_base_path }}/turnserver.conf"
# List of systemd services that matrix-coturn.service depends on
matrix_coturn_systemd_required_services_list: ['docker.service']

# A list of additional "volumes" to mount in the container.
# This list gets populated dynamically at runtime. You can provide a different default value,
# if you wish to mount your own files into the container.
# Contains definition objects like this: `{"src": "/outside", "dst": "/inside", "options": "rw|ro|slave|.."}
matrix_coturn_container_additional_volumes: []

# A shared secret (between Synapse and Coturn) used for authentication.
# You can put any string here, but generating a strong one is preferred (e.g. `pwgen -s 64 1`).
matrix_coturn_turn_static_auth_secret: ""


+ 3
- 0
roles/matrix-coturn/templates/systemd/matrix-coturn.service.j2 Просмотреть файл

@@ -20,6 +20,9 @@ ExecStart=/usr/bin/docker run --rm --name matrix-coturn \
-p 3478:3478/udp \
-p {{ matrix_coturn_turn_udp_min_port }}-{{ matrix_coturn_turn_udp_max_port }}:{{ matrix_coturn_turn_udp_min_port }}-{{ matrix_coturn_turn_udp_max_port }}/udp \
-v {{ matrix_coturn_config_path }}:/turnserver.conf:ro \
{% for volume in matrix_coturn_container_additional_volumes %}
-v {{ volume.src }}:{{ volume.dst }}:{{ volume.options }} \
{% endfor %}
{{ matrix_coturn_docker_image }} \
-c /turnserver.conf
ExecStop=-/usr/bin/docker kill matrix-coturn


Загрузка…
Отмена
Сохранить