Matrix Docker Ansible eploy
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 

46 lignes
2.3 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 }} stop -t {{ devture_systemd_docker_base_container_stop_grace_time_seconds }} 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. ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
  18. --rm \
  19. --name=matrix-bot-matrix-registration-bot \
  20. --log-driver=none \
  21. --cap-drop=ALL \
  22. -e "CONFIG_PATH=/config/config.yaml" \
  23. --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
  24. --read-only \
  25. --mount type=bind,src={{ matrix_bot_matrix_registration_bot_config_path }},dst=/config,ro \
  26. --mount type=bind,src={{ matrix_bot_matrix_registration_bot_data_path }},dst=/data \
  27. --network={{ matrix_bot_matrix_registration_bot_container_network }} \
  28. {{ matrix_bot_matrix_registration_bot_container_image }}
  29. {% for network in matrix_bot_matrix_registration_bot_container_additional_networks %}
  30. ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-bot-matrix-registration-bot
  31. {% endfor %}
  32. ExecStart={{ devture_systemd_docker_base_host_command_docker }} start --attach matrix-bot-matrix-registration-bot
  33. ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop -t {{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-bot-matrix-registration-bot 2>/dev/null || true'
  34. 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'
  35. Restart=always
  36. RestartSec=30
  37. SyslogIdentifier=matrix-bot-matrix-registration-bot
  38. [Install]
  39. WantedBy=multi-user.target