mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2024-11-14 06:22:51 +01:00
ab59cc50bd
Fixes #171 (Github Issue).
37 lines
1.1 KiB
Django/Jinja
37 lines
1.1 KiB
Django/Jinja
#jinja2: lstrip_blocks: "True"
|
|
[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
|
|
|
|
ExecStart=/usr/bin/docker run --rm --name matrix-dimension \
|
|
--log-driver=none \
|
|
--user={{ matrix_dimension_user_uid }}:{{ matrix_dimension_user_gid }} \
|
|
--cap-drop=ALL \
|
|
--network={{ matrix_docker_network }} \
|
|
{% if matrix_dimension_widgets_allow_self_signed_ssl_certificates %}
|
|
-e NODE_TLS_REJECT_UNAUTHORIZED=0 \
|
|
{% endif %}
|
|
{% if matrix_dimension_container_http_host_bind_port %}
|
|
-p {{ matrix_dimension_container_http_host_bind_port }}:8184 \
|
|
{% endif %}
|
|
-v {{ matrix_dimension_base_path }}:/data:rw \
|
|
{% for arg in matrix_dimension_container_extra_arguments %}
|
|
{{ arg }} \
|
|
{% endfor %}
|
|
{{ matrix_dimension_docker_image }}
|
|
|
|
ExecStop=-/usr/bin/docker kill matrix-dimension
|
|
ExecStop=-/usr/bin/docker rm matrix-dimension
|
|
Restart=always
|
|
RestartSec=30
|
|
SyslogIdentifier=matrix-dimension
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|