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

41 строка
1.6 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. [Unit]
  3. Description=Matrix helpdesk bot
  4. {% for service in matrix_bot_postmoogle_systemd_required_services_list %}
  5. Requires={{ service }}
  6. After={{ service }}
  7. {% endfor %}
  8. {% for service in matrix_bot_postmoogle_systemd_wanted_services_list %}
  9. Wants={{ service }}
  10. {% endfor %}
  11. DefaultDependencies=no
  12. [Service]
  13. Type=simple
  14. Environment="HOME={{ matrix_systemd_unit_home_path }}"
  15. ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-bot-postmoogle 2>/dev/null || true'
  16. ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-postmoogle 2>/dev/null || true'
  17. ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-postmoogle \
  18. --log-driver=none \
  19. --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
  20. --cap-drop=ALL \
  21. --read-only \
  22. --network={{ matrix_docker_network }} \
  23. --env-file={{ matrix_bot_postmoogle_config_path }}/env \
  24. -p {{ matrix_bot_postmoogle_smtp_host_bind_port }}:{{ matrix_bot_postmoogle_port }} \
  25. --mount type=bind,src={{ matrix_bot_postmoogle_data_path }},dst=/data \
  26. {% for arg in matrix_bot_postmoogle_container_extra_arguments %}
  27. {{ arg }} \
  28. {% endfor %}
  29. {{ matrix_bot_postmoogle_docker_image }}
  30. ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-bot-postmoogle 2>/dev/null || true'
  31. ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-postmoogle 2>/dev/null || true'
  32. Restart=always
  33. RestartSec=30
  34. SyslogIdentifier=matrix-bot-postmoogle
  35. [Install]
  36. WantedBy=multi-user.target