Matrix Docker Ansible eploy
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 

43 wiersze
1.7 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. [Unit]
  3. Description=Matrix reminder bot
  4. {% for service in matrix_bot_matrix_reminder_bot_systemd_required_services_list %}
  5. Requires={{ service }}
  6. After={{ service }}
  7. {% endfor %}
  8. {% for service in matrix_bot_matrix_reminder_bot_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-matrix-reminder-bot 2>/dev/null'
  16. ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-matrix-reminder-bot 2>/dev/null'
  17. ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-matrix-reminder-bot \
  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. -e 'TZ={{ matrix_bot_matrix_reminder_bot_reminders_timezone }}' \
  24. --mount type=bind,src={{ matrix_bot_matrix_reminder_bot_config_path }},dst=/config,ro \
  25. --mount type=bind,src={{ matrix_bot_matrix_reminder_bot_data_path }},dst=/data \
  26. --entrypoint=/bin/sh \
  27. {% for arg in matrix_bot_matrix_reminder_bot_container_extra_arguments %}
  28. {{ arg }} \
  29. {% endfor %}
  30. {{ matrix_bot_matrix_reminder_bot_docker_image }} \
  31. -c "matrix-reminder-bot /config/config.yaml"
  32. ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-bot-matrix-reminder-bot 2>/dev/null'
  33. ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-matrix-reminder-bot 2>/dev/null'
  34. Restart=always
  35. RestartSec=30
  36. SyslogIdentifier=matrix-bot-matrix-reminder-bot
  37. [Install]
  38. WantedBy=multi-user.target