Matrix Docker Ansible eploy
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 

57 lignes
2.3 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. [Unit]
  3. Description=Matrix Coturn server
  4. {% for service in matrix_coturn_systemd_required_services_list %}
  5. Requires={{ service }}
  6. After={{ service }}
  7. {% endfor %}
  8. DefaultDependencies=no
  9. [Service]
  10. Type=simple
  11. ExecStartPre=-{{ matrix_host_command_docker }} kill matrix-coturn
  12. ExecStartPre=-{{ matrix_host_command_docker }} rm matrix-coturn
  13. ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-coturn \
  14. --log-driver=none \
  15. --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
  16. --cap-drop=ALL \
  17. --entrypoint=turnserver \
  18. --read-only \
  19. --tmpfs=/var/tmp:rw,noexec,nosuid,size=100m \
  20. --network={{ matrix_coturn_docker_network }} \
  21. {% if matrix_coturn_container_stun_plain_host_bind_port != '' %}
  22. -p {{ matrix_coturn_container_stun_plain_host_bind_port }}:3478 \
  23. -p {{ matrix_coturn_container_stun_plain_host_bind_port }}:3478/udp \
  24. {% endif %}
  25. {% if matrix_coturn_container_stun_tls_host_bind_port != '' %}
  26. -p {{ matrix_coturn_container_stun_tls_host_bind_port }}:5349 \
  27. -p {{ matrix_coturn_container_stun_tls_host_bind_port }}:5349/udp \
  28. {% endif %}
  29. {% if matrix_coturn_container_turn_range_listen_interface is not none %}
  30. -p {{ matrix_coturn_container_turn_range_listen_interface }}{{ ':' if matrix_coturn_container_turn_range_listen_interface else '' }}{{ 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 \
  31. {% endif %}
  32. --mount type=bind,src={{ matrix_coturn_config_path }},dst=/turnserver.conf,ro \
  33. {% for volume in matrix_coturn_container_additional_volumes %}
  34. -v {{ volume.src }}:{{ volume.dst }}:{{ volume.options }} \
  35. {% endfor %}
  36. {% for arg in matrix_coturn_container_extra_arguments %}
  37. {{ arg }} \
  38. {% endfor %}
  39. {{ matrix_coturn_docker_image }} \
  40. -c /turnserver.conf
  41. ExecStop=-{{ matrix_host_command_docker }} kill matrix-coturn
  42. ExecStop=-{{ matrix_host_command_docker }} rm matrix-coturn
  43. # This only reloads certificates (not other configuration).
  44. # See: https://github.com/coturn/coturn/pull/236
  45. ExecReload={{ matrix_host_command_docker }} exec matrix-coturn kill -USR2 1
  46. Restart=always
  47. RestartSec=30
  48. SyslogIdentifier=matrix-coturn
  49. [Install]
  50. WantedBy=multi-user.target