Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

31 lines
984 B

  1. [Unit]
  2. Description=Matrix Coturn server
  3. {% for service in matrix_coturn_systemd_required_services_list %}
  4. Requires={{ service }}
  5. After={{ service }}
  6. {% endfor %}
  7. [Service]
  8. Type=simple
  9. ExecStartPre=-/usr/bin/docker kill matrix-coturn
  10. ExecStartPre=-/usr/bin/docker rm matrix-coturn
  11. ExecStart=/usr/bin/docker run --rm --name matrix-coturn \
  12. --log-driver=none \
  13. --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
  14. --cap-drop=ALL \
  15. --read-only \
  16. --tmpfs=/var/tmp:rw,noexec,nosuid,size=100m \
  17. -p 3478:3478 \
  18. -p 3478:3478/udp \
  19. -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 \
  20. -v {{ matrix_coturn_config_path }}:/turnserver.conf:ro \
  21. {{ matrix_coturn_docker_image }} \
  22. -c /turnserver.conf
  23. ExecStop=-/usr/bin/docker kill matrix-coturn
  24. ExecStop=-/usr/bin/docker rm matrix-coturn
  25. Restart=always
  26. RestartSec=30
  27. [Install]
  28. WantedBy=multi-user.target