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.
 
 

43 lines
2.2 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. [Unit]
  3. Description=Matrix LiveKit JWT Service
  4. {% for service in matrix_livekit_jwt_service_systemd_required_services_list %}
  5. After={{ service }}
  6. Requires={{ service }}
  7. {% endfor %}
  8. [Service]
  9. Type=simple
  10. Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
  11. 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-jwt-service 2>/dev/null || true'
  12. ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-livekit-jwt-service 2>/dev/null || true'
  13. ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
  14. --rm \
  15. --name=matrix-livekit-jwt-service \
  16. --log-driver=none \
  17. --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
  18. --cap-drop=ALL \
  19. --network={{ matrix_livekit_jwt_service_container_network }} \
  20. {% if matrix_livekit_jwt_service_container_http_host_bind_port %}
  21. -p {{ matrix_livekit_jwt_service_container_http_host_bind_port }}:{{ matrix_livekit_jwt_service_environment_variable_livekit_jwt_port }} \
  22. {% endif %}
  23. --env-file={{ matrix_livekit_jwt_service_base_path }}/env \
  24. --label-file={{ matrix_livekit_jwt_service_base_path }}/labels \
  25. {{ matrix_livekit_jwt_service_container_image }}
  26. {% for network in matrix_livekit_jwt_service_container_additional_networks %}
  27. ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-livekit-jwt-service
  28. {% endfor %}
  29. ExecStart={{ devture_systemd_docker_base_host_command_docker }} start --attach matrix-livekit-jwt-service
  30. 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-jwt-service 2>/dev/null || true'
  31. ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-jwt-service 2>/dev/null || true'
  32. Restart=always
  33. RestartSec=30
  34. SyslogIdentifier=matrix-livekit-jwt-service
  35. [Install]
  36. WantedBy=multi-user.target