Matrix Docker Ansible eploy
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 

47 řádky
2.2 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. [Unit]
  3. Description=Matrix Postmoogle 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={{ 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 --time={{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-bot-postmoogle 2>/dev/null || true'
  16. ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-bot-postmoogle 2>/dev/null || true'
  17. ExecStart={{ devture_systemd_docker_base_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. {% if matrix_bot_postmoogle_ssl_path %}
  26. -p {{ matrix_bot_postmoogle_submission_host_bind_port }}:{{ matrix_bot_postmoogle_tls_port }} \
  27. {% endif %}
  28. --mount type=bind,src={{ matrix_bot_postmoogle_data_path }},dst=/data \
  29. {% if matrix_bot_postmoogle_ssl_path %}
  30. --mount type=bind,src={{ matrix_bot_postmoogle_ssl_path }},dst=/ssl \
  31. {% endif %}
  32. {% for arg in matrix_bot_postmoogle_container_extra_arguments %}
  33. {{ arg }} \
  34. {% endfor %}
  35. {{ matrix_bot_postmoogle_docker_image }}
  36. ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop --time={{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-bot-postmoogle 2>/dev/null || true'
  37. ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-bot-postmoogle 2>/dev/null || true'
  38. Restart=always
  39. RestartSec=30
  40. SyslogIdentifier=matrix-bot-postmoogle
  41. [Install]
  42. WantedBy=multi-user.target