Matrix Docker Ansible eploy
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 

49 Zeilen
2.3 KiB

  1. #jinja2: lstrip_blocks: True
  2. [Unit]
  3. Description=Matrix Mautrix wsproxy bridge
  4. {% for service in matrix_mautrix_wsproxy_systemd_required_services_list %}
  5. Requires={{ service }}
  6. After={{ service }}
  7. {% endfor %}
  8. {% for service in matrix_mautrix_wsproxy_systemd_wanted_services_list %}
  9. Wants={{ service }}
  10. {% endfor %}
  11. DefaultDependencies=no
  12. [Service]
  13. Type=simple
  14. Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
  15. ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop -t {{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-mautrix-wsproxy 2>/dev/null'
  16. ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-mautrix-wsproxy 2>/dev/null'
  17. ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create --rm --name matrix-mautrix-wsproxy \
  18. --log-driver=none \
  19. --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
  20. --cap-drop=ALL \
  21. --network={{ matrix_mautrix_wsproxy_container_network }} \
  22. {% if matrix_mautrix_wsproxy_bind_port %}
  23. -p {{ matrix_mautrix_wsproxy_port }}:29331 \
  24. {% endif %}
  25. --mount type=bind,src={{ matrix_mautrix_wsproxy_config_path }},dst=/data \
  26. --label-file={{ matrix_mautrix_wsproxy_base_path }}/wsproxy-labels \
  27. {% for arg in matrix_mautrix_wsproxy_container_extra_arguments %}
  28. {{ arg }} \
  29. {% endfor %}
  30. {{ matrix_mautrix_wsproxy_container_image }} \
  31. /usr/bin/mautrix-wsproxy -config /data/config.yaml
  32. {% for network in matrix_mautrix_wsproxy_container_additional_networks %}
  33. ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-mautrix-wsproxy
  34. {% endfor %}
  35. ExecStart={{ devture_systemd_docker_base_host_command_docker }} start --attach matrix-mautrix-wsproxy
  36. ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop -t {{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-mautrix-wsproxy 2>/dev/null'
  37. ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-mautrix-wsproxy 2>/dev/null'
  38. Restart=always
  39. RestartSec=30
  40. SyslogIdentifier=matrix-mautrix-wsproxy
  41. [Install]
  42. WantedBy=multi-user.target