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.6 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. [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-web 2>/dev/null || true'
  13. ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-web 2>/dev/null || true'
  14. ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-jitsi-web \
  15. --log-driver=none \
  16. --network={{ matrix_docker_network }} \
  17. --network-alias={{ matrix_jitsi_xmpp_domain }} \
  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. --mount type=bind,src={{ matrix_jitsi_web_crontabs_path }},dst=/var/spool/cron/crontabs \
  25. {% for arg in matrix_jitsi_web_container_extra_arguments %}
  26. {{ arg }} \
  27. {% endfor %}
  28. {{ matrix_jitsi_web_docker_image }}
  29. ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-jitsi-web 2>/dev/null || true'
  30. ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-web 2>/dev/null || true'
  31. Restart=always
  32. RestartSec=30
  33. SyslogIdentifier=matrix-jitsi-web
  34. [Install]
  35. WantedBy=multi-user.target