2019-05-07 19:23:35 +00:00
|
|
|
#jinja2: lstrip_blocks: "True"
|
2019-03-07 05:22:08 +00:00
|
|
|
[Unit]
|
|
|
|
Description=Matrix Dimension
|
|
|
|
After=docker.service
|
|
|
|
Requires=docker.service
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=simple
|
|
|
|
ExecStartPre=-/usr/bin/docker kill matrix-dimension
|
|
|
|
ExecStartPre=-/usr/bin/docker rm matrix-dimension
|
2019-05-16 00:41:45 +00:00
|
|
|
|
2019-03-07 05:22:08 +00:00
|
|
|
ExecStart=/usr/bin/docker run --rm --name matrix-dimension \
|
|
|
|
--log-driver=none \
|
2019-03-08 13:00:53 +00:00
|
|
|
--user={{ matrix_dimension_user_uid }}:{{ matrix_dimension_user_gid }} \
|
2019-03-07 05:22:08 +00:00
|
|
|
--cap-drop=ALL \
|
|
|
|
--network={{ matrix_docker_network }} \
|
2019-03-12 10:17:12 +00:00
|
|
|
{% if matrix_dimension_widgets_allow_self_signed_ssl_certificates %}
|
|
|
|
-e NODE_TLS_REJECT_UNAUTHORIZED=0 \
|
|
|
|
{% endif %}
|
2019-05-24 22:41:04 +00:00
|
|
|
{% if matrix_dimension_container_http_host_bind_port %}
|
|
|
|
-p {{ matrix_dimension_container_http_host_bind_port }}:8184 \
|
2019-03-08 13:00:53 +00:00
|
|
|
{% endif %}
|
2019-03-07 05:22:08 +00:00
|
|
|
-v {{ matrix_dimension_base_path }}:/data:rw \
|
2019-04-30 14:35:18 +00:00
|
|
|
{% for arg in matrix_dimension_container_extra_arguments %}
|
|
|
|
{{ arg }} \
|
|
|
|
{% endfor %}
|
2019-03-07 05:22:08 +00:00
|
|
|
{{ matrix_dimension_docker_image }}
|
2019-05-16 00:41:45 +00:00
|
|
|
|
2019-03-07 05:22:08 +00:00
|
|
|
ExecStop=-/usr/bin/docker kill matrix-dimension
|
|
|
|
ExecStop=-/usr/bin/docker rm matrix-dimension
|
|
|
|
Restart=always
|
|
|
|
RestartSec=30
|
2019-05-16 00:41:45 +00:00
|
|
|
SyslogIdentifier=matrix-dimension
|
2019-03-07 05:22:08 +00:00
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|