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

38 строки
1.8 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. [Unit]
  3. Description=Matrix registration bot
  4. {% for service in matrix_bot_matrix_registration_bot_systemd_required_services_list %}
  5. Requires={{ service }}
  6. After={{ service }}
  7. {% endfor %}
  8. {% for service in matrix_bot_matrix_registration_bot_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 }} kill matrix-bot-matrix-registration-bot 2>/dev/null || true'
  16. ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-bot-matrix-registration-bot 2>/dev/null || true'
  17. ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-bot-matrix-registration-bot \
  18. --log-driver=none \
  19. --cap-drop=ALL \
  20. -e "CONFIG_PATH=/config/config.yml" \
  21. --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
  22. --read-only \
  23. --mount type=bind,src={{ matrix_bot_matrix_registration_bot_config_path }},dst=/config,ro \
  24. --mount type=bind,src={{ matrix_bot_matrix_registration_bot_data_path }},dst=/data \
  25. --network={{ matrix_docker_network }} \
  26. {{ matrix_bot_matrix_registration_bot_docker_image }}
  27. ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-bot-matrix-registration-bot 2>/dev/null || true'
  28. ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-bot-matrix-registration-bot 2>/dev/null || true'
  29. Restart=always
  30. RestartSec=30
  31. SyslogIdentifier=matrix-bot-matrix-registration-bot
  32. [Install]
  33. WantedBy=multi-user.target