mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2024-11-13 05:52:50 +01:00
40 lines
1.5 KiB
Django/Jinja
40 lines
1.5 KiB
Django/Jinja
#jinja2: lstrip_blocks: "True"
|
|
[Unit]
|
|
Description=Matrix jitsi-jibri server
|
|
{% for service in matrix_jitsi_jibri_systemd_required_services_list %}
|
|
Requires={{ service }}
|
|
After={{ service }}
|
|
{% endfor %}
|
|
DefaultDependencies=no
|
|
|
|
[Service]
|
|
Type=simple
|
|
Environment="HOME={{ matrix_systemd_unit_home_path }}"
|
|
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-jitsi-jibri 2>/dev/null'
|
|
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-jibri 2>/dev/null'
|
|
|
|
ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-jitsi-jibri \
|
|
--log-driver=none \
|
|
--network={{ matrix_docker_network }} \
|
|
--env-file={{ matrix_jitsi_jibri_base_path }}/env \
|
|
# --device=/dev/snd:/dev/snd \
|
|
--mount type=bind,src=/dev/snd,dst=/dev/snd \
|
|
--mount type=bind,src={{ matrix_jitsi_jibri_config_path }},dst=/config \
|
|
# --volume={{ matrix_jitsi_jibri_config_path }}:/config:Z \
|
|
--volume=/dev/shm:/dev/shm \
|
|
--cap-add=SYS_ADMIN \
|
|
--cap-add=NET_BIND_SERVICE \
|
|
{% for arg in matrix_jitsi_jibri_container_extra_arguments %}
|
|
{{ arg }} \
|
|
{% endfor %}
|
|
{{ matrix_jitsi_jibri_docker_image }}
|
|
|
|
ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-jitsi-jibri 2>/dev/null'
|
|
ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-jibri 2>/dev/null'
|
|
Restart=always
|
|
RestartSec=30
|
|
SyslogIdentifier=matrix-jitsi-jibri
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|