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.
 
 
 

40 lines
1.5 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. [Unit]
  3. Description=Matrix jitsi-web server
  4. {% for service in matrix_jitsi_web_systemd_required_services_list %}
  5. Requires={{ service }}
  6. After={{ service }}
  7. {% endfor %}
  8. DefaultDependencies=no
  9. PartOf=matrix.target
  10. [Service]
  11. Type=simple
  12. Environment="HOME={{ matrix_systemd_unit_home_path }}"
  13. ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-jitsi-web 2>/dev/null'
  14. ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-web 2>/dev/null'
  15. ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-jitsi-web \
  16. --log-driver=none \
  17. --network={{ matrix_docker_network }} \
  18. --env-file={{ matrix_jitsi_web_base_path }}/env \
  19. {% if matrix_jitsi_web_container_http_host_bind_port %}
  20. -p {{ matrix_jitsi_web_container_http_host_bind_port }}:80 \
  21. {% endif %}
  22. --mount type=bind,src={{ matrix_jitsi_web_config_path }},dst=/config \
  23. --mount type=bind,src={{ matrix_jitsi_web_transcripts_path }},dst=/usr/share/jitsi-meet/transcripts \
  24. {% for arg in matrix_jitsi_web_container_extra_arguments %}
  25. {{ arg }} \
  26. {% endfor %}
  27. {{ matrix_jitsi_web_docker_image }}
  28. ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-jitsi-web 2>/dev/null'
  29. ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-web 2>/dev/null'
  30. Restart=always
  31. RestartSec=30
  32. SyslogIdentifier=matrix-jitsi-web
  33. [Install]
  34. WantedBy=matrix.target