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.
 
 

43 lines
1.7 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. [Unit]
  3. Description=Matrix jitsi-jvb server
  4. {% for service in matrix_jitsi_jvb_systemd_required_services_list %}
  5. Requires={{ service }}
  6. After={{ service }}
  7. {% endfor %}
  8. DefaultDependencies=no
  9. [Service]
  10. Type=simple
  11. Environment="HOME={{ matrix_systemd_unit_home_path }}"
  12. ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-jitsi-jvb 2>/dev/null'
  13. ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-jvb 2>/dev/null'
  14. ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-jitsi-jvb \
  15. --log-driver=none \
  16. --network={{ matrix_docker_network }} \
  17. --env-file={{ matrix_jitsi_jvb_base_path }}/env \
  18. {% if matrix_jitsi_jvb_container_rtp_udp_host_bind_port %}
  19. -p {{ matrix_jitsi_jvb_container_rtp_udp_host_bind_port }}:{{ matrix_jitsi_jvb_rtp_udp_port }}/udp \
  20. {% endif %}
  21. {% if matrix_jitsi_jvb_container_rtp_tcp_host_bind_port %}
  22. -p {{ matrix_jitsi_jvb_container_rtp_tcp_host_bind_port }}:{{ matrix_jitsi_jvb_rtp_tcp_port }} \
  23. {% endif %}
  24. {% if matrix_jitsi_jvb_container_colibri_ws_host_bind_port %}
  25. -p {{ matrix_jitsi_jvb_container_colibri_ws_host_bind_port }}:9090 \
  26. {% endif %}
  27. --mount type=bind,src={{ matrix_jitsi_jvb_config_path }},dst=/config \
  28. {% for arg in matrix_jitsi_jvb_container_extra_arguments %}
  29. {{ arg }} \
  30. {% endfor %}
  31. {{ matrix_jitsi_jvb_docker_image }}
  32. ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-jitsi-jvb 2>/dev/null'
  33. ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-jvb 2>/dev/null'
  34. Restart=always
  35. RestartSec=30
  36. SyslogIdentifier=matrix-jitsi-jvb
  37. [Install]
  38. WantedBy=multi-user.target