Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 

44 строки
1.7 KiB

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