2024-09-30 23:04:10 +10:00
|
|
|
#jinja2: lstrip_blocks: "True"
|
2024-09-26 13:40:38 +10:00
|
|
|
[Unit]
|
2024-09-30 22:20:46 +10:00
|
|
|
Description=Matrix LiveKit Server
|
2024-09-26 13:40:38 +10:00
|
|
|
After=docker.service
|
|
|
|
Requires=docker.service
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=simple
|
|
|
|
Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
|
2024-09-30 22:20:46 +10:00
|
|
|
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-livekit-server 2>/dev/null || true'
|
|
|
|
ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-livekit-server 2>/dev/null || true'
|
2024-09-26 13:40:38 +10:00
|
|
|
|
|
|
|
ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
|
|
|
|
--rm \
|
2024-09-30 22:20:46 +10:00
|
|
|
--name=matrix-livekit-server \
|
2024-09-26 13:40:38 +10:00
|
|
|
--log-driver=none \
|
|
|
|
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
|
|
|
|
--cap-drop=ALL \
|
|
|
|
--network=host \
|
2024-09-30 22:20:46 +10:00
|
|
|
--mount type=bind,src={{ matrix_livekit_server_base_path }}/livekit.yaml,dst=/etc/livekit.yaml,ro \
|
|
|
|
--label-file={{ matrix_livekit_server_base_path }}/labels \
|
2024-09-26 13:40:38 +10:00
|
|
|
{{ matrix_livekit_image }} \
|
|
|
|
--dev --config /etc/livekit.yaml
|
|
|
|
|
2024-09-30 22:20:46 +10:00
|
|
|
ExecStart={{ devture_systemd_docker_base_host_command_docker }} start --attach matrix-livekit-server
|
2024-09-26 13:40:38 +10:00
|
|
|
|
2024-09-30 22:20:46 +10:00
|
|
|
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-livekit-server 2>/dev/null || true'
|
|
|
|
ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-livekit-server 2>/dev/null || true'
|
2024-09-26 13:40:38 +10:00
|
|
|
Restart=always
|
|
|
|
RestartSec=30
|
2024-09-30 22:20:46 +10:00
|
|
|
SyslogIdentifier=matrix-livekit-server
|
2024-09-26 13:40:38 +10:00
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|