Matrix Docker Ansible eploy
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 

50 satır
2.5 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. [Unit]
  3. Description=Matrix Authentication Service
  4. {% for service in matrix_authentication_service_systemd_required_services_list %}
  5. Requires={{ service }}
  6. After={{ service }}
  7. {% endfor %}
  8. {% for service in matrix_authentication_service_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-authentication-service 2>/dev/null || true'
  16. ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-authentication-service 2>/dev/null || true'
  17. ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
  18. --rm \
  19. --name=matrix-authentication-service \
  20. --log-driver=none \
  21. --user={{ matrix_authentication_service_uid }}:{{ matrix_authentication_service_gid }} \
  22. --cap-drop=ALL \
  23. --read-only \
  24. --network={{ matrix_authentication_service_container_network }} \
  25. --env-file={{ matrix_authentication_service_config_path }}/env \
  26. --label-file={{ matrix_authentication_service_config_path }}/labels \
  27. --mount type=bind,src={{ matrix_authentication_service_config_path }}/config.yaml,dst=/config.yaml,ro \
  28. --mount type=bind,src={{ matrix_authentication_service_data_keys_path }},dst=/keys,ro \
  29. {% for arg in matrix_authentication_service_container_extra_arguments %}
  30. {{ arg }} \
  31. {% endfor %}
  32. {{ matrix_authentication_service_container_image }}
  33. {% for network in matrix_authentication_service_container_additional_networks %}
  34. ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-authentication-service
  35. {% endfor %}
  36. ExecStart={{ devture_systemd_docker_base_host_command_docker }} start --attach matrix-authentication-service
  37. 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-authentication-service 2>/dev/null || true'
  38. ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-authentication-service 2>/dev/null || true'
  39. Restart=always
  40. RestartSec=30
  41. SyslogIdentifier=matrix-authentication-service
  42. [Install]
  43. WantedBy=multi-user.target