Matrix Docker Ansible eploy
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 

43 líneas
2.0 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. [Unit]
  3. Description=matrix-registration
  4. {% for service in matrix_registration_systemd_required_services_list %}
  5. Requires={{ service }}
  6. After={{ service }}
  7. {% endfor %}
  8. {% for service in matrix_registration_systemd_wanted_services_list %}
  9. Wants={{ service }}
  10. {% endfor %}
  11. DefaultDependencies=no
  12. [Service]
  13. Type=simple
  14. Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
  15. 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-registration 2>/dev/null || true'
  16. ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-registration 2>/dev/null || true'
  17. ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-registration \
  18. --log-driver=none \
  19. --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
  20. --cap-drop=ALL \
  21. --network={{ matrix_docker_network }} \
  22. {% if matrix_registration_container_http_host_bind_port %}
  23. -p {{ matrix_registration_container_http_host_bind_port }}:5000 \
  24. {% endif %}
  25. --mount type=bind,src={{ matrix_registration_config_path }},dst=/config,ro \
  26. --mount type=bind,src={{ matrix_registration_data_path }},dst=/data \
  27. {% for arg in matrix_registration_container_extra_arguments %}
  28. {{ arg }} \
  29. {% endfor %}
  30. {{ matrix_registration_docker_image }} \
  31. serve
  32. 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-registration 2>/dev/null || true'
  33. ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-registration 2>/dev/null || true'
  34. Restart=always
  35. RestartSec=30
  36. SyslogIdentifier=matrix-registration
  37. [Install]
  38. WantedBy=multi-user.target