Matrix Docker Ansible eploy
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 

41 righe
1.4 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. [Unit]
  3. Description=Matrix mailer
  4. After=docker.service
  5. Requires=docker.service
  6. DefaultDependencies=no
  7. PartOf=matrix.target
  8. [Service]
  9. Type=simple
  10. Environment="HOME={{ matrix_systemd_unit_home_path }}"
  11. ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-mailer 2>/dev/null'
  12. ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mailer 2>/dev/null'
  13. # --hostname gives us a friendlier hostname than the default.
  14. # The real hostname is passed via a `HOSTNAME` environment variable though.
  15. ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mailer \
  16. --log-driver=none \
  17. --user={{ matrix_mailer_container_user_uid }}:{{ matrix_mailer_container_user_gid }} \
  18. --cap-drop=ALL \
  19. --read-only \
  20. --init \
  21. --tmpfs=/var/spool/exim:rw,noexec,nosuid,size=100m \
  22. --network={{ matrix_docker_network }} \
  23. --env-file={{ matrix_mailer_base_path }}/env-mailer \
  24. --hostname=matrix-mailer \
  25. {% for arg in matrix_mailer_container_extra_arguments %}
  26. {{ arg }} \
  27. {% endfor %}
  28. {{ matrix_mailer_docker_image }}
  29. ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-mailer 2>/dev/null'
  30. ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mailer 2>/dev/null'
  31. Restart=always
  32. RestartSec=30
  33. SyslogIdentifier=matrix-mailer
  34. [Install]
  35. WantedBy=matrix.target