Matrix Docker Ansible eploy
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 

45 řádky
1.7 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. [Unit]
  3. Description=Matrix Appservice webhooks bridge
  4. {% for service in matrix_appservice_webhooks_systemd_required_services_list %}
  5. Requires={{ service }}
  6. After={{ service }}
  7. {% endfor %}
  8. {% for service in matrix_appservice_webhooks_systemd_wanted_services_list %}
  9. Wants={{ service }}
  10. {% endfor %}
  11. DefaultDependencies=no
  12. [Service]
  13. Type=simple
  14. ExecStartPre=-{{ matrix_host_command_docker }} kill matrix-appservice-webhooks
  15. ExecStartPre=-{{ matrix_host_command_docker }} rm matrix-appservice-webhooks
  16. # Intentional delay, so that the homeserver (we likely depend on) can manage to start.
  17. ExecStartPre={{ matrix_host_command_sleep }} 5
  18. ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-appservice-webhooks \
  19. --log-driver=none \
  20. --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
  21. --cap-drop=ALL \
  22. --network={{ matrix_docker_network }} \
  23. {% if matrix_appservice_webhooks_container_http_host_bind_port %}
  24. -p {{ matrix_appservice_webhooks_container_http_host_bind_port }}:{{matrix_appservice_webhooks_matrix_port}} \
  25. {% endif %}
  26. -v {{ matrix_appservice_webhooks_config_path }}:/config:z \
  27. -v {{ matrix_appservice_webhooks_data_path }}:/data:z \
  28. {% for arg in matrix_appservice_webhooks_container_extra_arguments %}
  29. {{ arg }} \
  30. {% endfor %}
  31. {{ matrix_appservice_webhooks_docker_image }} \
  32. node index.js -p {{ matrix_appservice_webhooks_matrix_port }} -c /config/config.yaml -f /config/webhooks-registration.yaml
  33. ExecStop=-{{ matrix_host_command_docker }} kill matrix-appservice-webhooks
  34. ExecStop=-{{ matrix_host_command_docker }} rm matrix-appservice-webhooks
  35. Restart=always
  36. RestartSec=30
  37. SyslogIdentifier=matrix-appservice-webhooks
  38. [Install]
  39. WantedBy=multi-user.target