Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

35 line
1.7 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. [Unit]
  3. Description=Matrix LiveKit Server
  4. After=docker.service
  5. Requires=docker.service
  6. [Service]
  7. Type=simple
  8. Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
  9. 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'
  10. ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-livekit-server 2>/dev/null || true'
  11. ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
  12. --rm \
  13. --name=matrix-livekit-server \
  14. --log-driver=none \
  15. --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
  16. --cap-drop=ALL \
  17. --network=host \
  18. --mount type=bind,src={{ livekit_server_base_path }}/livekit.yaml,dst=/etc/livekit.yaml,ro \
  19. --label-file={{ livekit_server_base_path }}/labels \
  20. {{ livekit_server_container_image }} \
  21. --dev --config /etc/livekit.yaml
  22. ExecStart={{ devture_systemd_docker_base_host_command_docker }} start --attach matrix-livekit-server
  23. 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'
  24. ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-livekit-server 2>/dev/null || true'
  25. Restart=always
  26. RestartSec=30
  27. SyslogIdentifier=matrix-livekit-server
  28. [Install]
  29. WantedBy=multi-user.target