mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2024-11-08 19:57:35 +01:00
ea992496a3
This is split out from matrix-cactus-comments (see 241779b583
),
but also heavily inspired by `matrix-static-files`.
49 lines
2.5 KiB
Django/Jinja
Executable File
49 lines
2.5 KiB
Django/Jinja
Executable File
#jinja2: lstrip_blocks: "True"
|
|
[Unit]
|
|
Description=matrix-cactus-comments-client server
|
|
{% for service in matrix_cactus_comments_client_systemd_required_services_list %}
|
|
Requires={{ service }}
|
|
After={{ service }}
|
|
{% endfor %}
|
|
{% for service in matrix_cactus_comments_client_systemd_wanted_services_list %}
|
|
Wants={{ service }}
|
|
{% endfor %}
|
|
DefaultDependencies=no
|
|
|
|
[Service]
|
|
Type=simple
|
|
Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
|
|
ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop --time={{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-cactus-comments-client 2>/dev/null || true'
|
|
ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-cactus-comments-client 2>/dev/null || true'
|
|
|
|
ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
|
|
--rm \
|
|
--name=matrix-cactus-comments-client \
|
|
--log-driver=none \
|
|
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
|
|
--cap-drop=ALL \
|
|
--read-only \
|
|
--network={{ matrix_cactus_comments_client_container_network }} \
|
|
{% if matrix_cactus_comments_client_container_http_host_bind_port %}
|
|
-p {{ matrix_cactus_comments_client_container_http_host_bind_port }}:{{ matrix_cactus_comments_client_environment_variable_server_port }} \
|
|
{% endif %}
|
|
--env-file={{ matrix_cactus_comments_client_base_path }}/env \
|
|
--label-file={{ matrix_cactus_comments_client_base_path }}/labels \
|
|
--mount type=bind,src={{ matrix_cactus_comments_client_public_path }},dst=/public,ro \
|
|
{{ matrix_cactus_comments_client_container_image }}
|
|
|
|
{% for network in matrix_cactus_comments_client_container_additional_networks %}
|
|
ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-cactus-comments-client
|
|
{% endfor %}
|
|
|
|
ExecStart={{ devture_systemd_docker_base_host_command_docker }} start --attach matrix-cactus-comments-client
|
|
|
|
ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop --time={{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-cactus-comments-client 2>/dev/null || true'
|
|
ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-cactus-comments-client 2>/dev/null || true'
|
|
Restart=always
|
|
RestartSec=30
|
|
SyslogIdentifier=matrix-cactus-comments-client
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|