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ů.
 
 

55 řádky
2.5 KiB

  1. #jinja2: lstrip_blocks: True
  2. [Unit]
  3. Description=Matrix Postmoogle bridge
  4. {% for service in matrix_postmoogle_systemd_required_services_list %}
  5. Requires={{ service }}
  6. After={{ service }}
  7. {% endfor %}
  8. {% for service in matrix_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 -t {{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-postmoogle 2>/dev/null || true'
  16. ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-postmoogle 2>/dev/null || true'
  17. ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
  18. --rm \
  19. --name=matrix-postmoogle \
  20. --log-driver=none \
  21. --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
  22. --cap-drop=ALL \
  23. --read-only \
  24. --network={{ matrix_postmoogle_container_network }} \
  25. --env-file={{ matrix_postmoogle_config_path }}/env \
  26. -p {{ matrix_postmoogle_smtp_host_bind_port }}:{{ matrix_postmoogle_port }} \
  27. {% if matrix_postmoogle_ssl_path %}
  28. -p {{ matrix_postmoogle_submission_host_bind_port }}:{{ matrix_postmoogle_tls_port }} \
  29. {% endif %}
  30. --mount type=bind,src={{ matrix_postmoogle_data_path }},dst=/data \
  31. {% if matrix_postmoogle_ssl_path %}
  32. --mount type=bind,src={{ matrix_postmoogle_ssl_path }},dst=/ssl \
  33. {% endif %}
  34. {% for arg in matrix_postmoogle_container_extra_arguments %}
  35. {{ arg }} \
  36. {% endfor %}
  37. {{ matrix_postmoogle_container_image }}
  38. {% for network in matrix_postmoogle_container_additional_networks %}
  39. ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-postmoogle
  40. {% endfor %}
  41. ExecStart={{ devture_systemd_docker_base_host_command_docker }} start --attach matrix-postmoogle
  42. 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-postmoogle 2>/dev/null || true'
  43. ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-postmoogle 2>/dev/null || true'
  44. Restart=always
  45. RestartSec=30
  46. SyslogIdentifier=matrix-postmoogle
  47. [Install]
  48. WantedBy=multi-user.target