Matrix Docker Ansible eploy
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 

45 行
2.1 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. [Unit]
  3. Description=A bridge between Matrix and multiple project management services, such as GitHub, GitLab and JIRA.
  4. {% for service in matrix_hookshot_systemd_required_services_list %}
  5. Requires={{ service }}
  6. After={{ service }}
  7. {% endfor %}
  8. {% for service in matrix_hookshot_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_docker }} stop --time={{ devture_systemd_docker_base_container_stop_grace_time_seconds }} {{ matrix_hookshot_container_ident }}
  16. ExecStartPre=-{{ devture_systemd_docker_base_host_command_docker }} rm {{ matrix_hookshot_container_ident }}
  17. ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create --rm --name {{ matrix_hookshot_container_ident }} \
  18. --log-driver=none \
  19. --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
  20. --cap-drop=ALL \
  21. --network={{ matrix_hookshot_container_network }} \
  22. --mount type=bind,src={{ matrix_hookshot_base_path }},dst=/data \
  23. {% for port in matrix_hookshot_container_http_host_bind_ports %}
  24. -p {{ port }} \
  25. {% endfor %}
  26. {% for arg in matrix_hookshot_container_extra_arguments %}
  27. {{ arg }} \
  28. {% endfor %}
  29. {{ matrix_hookshot_docker_image }}
  30. {% for network in matrix_hookshot_container_additional_networks %}ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network ]] {{ matrix_hookshot_container_ident }}{% endfor %}
  31. ExecStart={{ devture_systemd_docker_base_host_command_docker }} start --attach {{ matrix_hookshot_container_ident }}
  32. ExecStop=-{{ devture_systemd_docker_base_host_command_docker }} stop --time={{ devture_systemd_docker_base_container_stop_grace_time_seconds }} {{ matrix_hookshot_container_ident }}
  33. ExecStop=-{{ devture_systemd_docker_base_host_command_docker }} rm {{ matrix_hookshot_container_ident }}
  34. Restart=always
  35. RestartSec=30
  36. SyslogIdentifier={{ matrix_hookshot_container_ident }}
  37. [Install]
  38. WantedBy=multi-user.target