2019-05-07 19:23:35 +00:00
|
|
|
#jinja2: lstrip_blocks: "True"
|
2018-08-14 11:11:41 +00:00
|
|
|
[Unit]
|
|
|
|
Description=Matrix mailer
|
|
|
|
After=docker.service
|
|
|
|
Requires=docker.service
|
2020-12-10 09:36:39 +00:00
|
|
|
DefaultDependencies=no
|
2018-08-14 11:11:41 +00:00
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=simple
|
2020-05-27 16:53:52 +00:00
|
|
|
ExecStartPre=-{{ matrix_host_command_docker }} kill matrix-mailer
|
|
|
|
ExecStartPre=-{{ matrix_host_command_docker }} rm matrix-mailer
|
2019-05-16 00:41:45 +00:00
|
|
|
|
2020-05-27 16:53:52 +00:00
|
|
|
ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mailer \
|
2018-09-26 06:11:19 +00:00
|
|
|
--log-driver=none \
|
2019-01-27 18:25:13 +00:00
|
|
|
--user={{ matrix_mailer_container_user_uid }}:{{ matrix_mailer_container_user_gid }} \
|
2019-01-28 09:22:54 +00:00
|
|
|
--cap-drop=ALL \
|
2019-01-29 16:52:02 +00:00
|
|
|
--read-only \
|
2019-09-04 07:04:14 +00:00
|
|
|
--init \
|
2019-01-29 16:52:02 +00:00
|
|
|
--tmpfs=/var/spool/exim:rw,noexec,nosuid,size=100m \
|
2018-08-14 11:11:41 +00:00
|
|
|
--network={{ matrix_docker_network }} \
|
2019-01-12 15:53:00 +00:00
|
|
|
--env-file={{ matrix_mailer_base_path }}/env-mailer \
|
2019-02-28 09:51:09 +00:00
|
|
|
--hostname={{ matrix_server_fqn_matrix }} \
|
2019-04-30 14:35:18 +00:00
|
|
|
{% for arg in matrix_mailer_container_extra_arguments %}
|
|
|
|
{{ arg }} \
|
|
|
|
{% endfor %}
|
2018-11-01 06:46:47 +00:00
|
|
|
{{ matrix_mailer_docker_image }}
|
2019-05-16 00:41:45 +00:00
|
|
|
|
2020-05-27 16:53:52 +00:00
|
|
|
ExecStop=-{{ matrix_host_command_docker }} kill matrix-mailer
|
|
|
|
ExecStop=-{{ matrix_host_command_docker }} rm matrix-mailer
|
2018-08-14 11:11:41 +00:00
|
|
|
Restart=always
|
|
|
|
RestartSec=30
|
2019-05-16 00:41:45 +00:00
|
|
|
SyslogIdentifier=matrix-mailer
|
2018-08-14 11:11:41 +00:00
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|