Matrix Docker Ansible eploy
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 

53 rader
2.7 KiB

  1. #jinja2: lstrip_blocks: True
  2. [Unit]
  3. Description=matrix_ldap_registration_proxy
  4. {% for service in matrix_ldap_registration_proxy_systemd_required_services_list %}
  5. Requires={{ service }}
  6. After={{ service }}
  7. {% endfor %}
  8. {% for service in matrix_ldap_registration_proxy_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 -t {{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-ldap-registration-proxy 2>/dev/null || true'
  16. ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-ldap-registration-proxy 2>/dev/null || true'
  17. # matrix_ldap_registration_proxy writes an SQLite shared library (libsqlitejdbc.so) to /tmp and executes it from there,
  18. # so /tmp needs to be mounted with an exec option.
  19. ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
  20. --rm \
  21. --name=matrix-ldap-registration-proxy \
  22. --log-driver=none \
  23. --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
  24. --cap-drop=ALL \
  25. --read-only \
  26. --network={{ matrix_ldap_registration_proxy_container_network }} \
  27. {% if matrix_ldap_registration_proxy_container_http_host_bind_port %}
  28. -p {{ matrix_ldap_registration_proxy_container_http_host_bind_port }}:{{ matrix_ldap_registration_listen_port }} \
  29. {% endif %}
  30. --env-file {{ matrix_ldap_registration_proxy_config_path }}/ldap-registration-proxy.env \
  31. --label-file={{ matrix_ldap_registration_proxy_base_path }}/labels \
  32. {% for arg in matrix_ldap_registration_proxy_container_extra_arguments %}
  33. {{ arg }} \
  34. {% endfor %}
  35. {{ matrix_ldap_registration_proxy_docker_image }}
  36. {% for network in matrix_ldap_registration_proxy_container_additional_networks %}
  37. ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-ldap-registration-proxy
  38. {% endfor %}
  39. ExecStart={{ devture_systemd_docker_base_host_command_docker }} start --attach matrix-ldap-registration-proxy
  40. ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop -t {{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-ldap-registration-proxy 2>/dev/null || true'
  41. ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-ldap-registration-proxy 2>/dev/null || true'
  42. Restart=always
  43. RestartSec=30
  44. SyslogIdentifier=matrix-ldap-registration-proxy
  45. [Install]
  46. WantedBy=multi-user.target