Matrix Docker Ansible eploy
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 

47 righe
2.1 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. [Unit]
  3. Description=Conduit Matrix homeserver
  4. {% for service in matrix_conduit_systemd_required_services_list %}
  5. Requires={{ service }}
  6. After={{ 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 }} kill matrix-conduit 2>/dev/null || true'
  12. ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-conduit 2>/dev/null || true'
  13. ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
  14. --rm \
  15. --name=matrix-conduit \
  16. --log-driver=none \
  17. --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
  18. --cap-drop=ALL \
  19. --read-only \
  20. --tmpfs=/tmp:rw,noexec,nosuid,size={{ matrix_conduit_tmp_directory_size_mb }}m \
  21. --network={{ matrix_conduit_container_network }} \
  22. --env CONDUIT_CONFIG=/etc/matrix-conduit/conduit.toml \
  23. --mount type=bind,src={{ matrix_conduit_data_path }},dst=/var/lib/matrix-conduit \
  24. --mount type=bind,src={{ matrix_conduit_config_path }},dst=/etc/matrix-conduit,ro \
  25. {% for arg in matrix_conduit_container_extra_arguments %}
  26. {{ arg }} \
  27. {% endfor %}
  28. {{ matrix_conduit_docker_image }}
  29. {% for network in matrix_conduit_container_additional_networks %}
  30. ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-conduit
  31. {% endfor %}
  32. ExecStart={{ devture_systemd_docker_base_host_command_docker }} start --attach matrix-conduit
  33. ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-conduit 2>/dev/null || true'
  34. ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-conduit 2>/dev/null || true'
  35. ExecReload={{ devture_systemd_docker_base_host_command_docker }} exec matrix-conduit /bin/sh -c 'kill -HUP 1'
  36. Restart=always
  37. RestartSec=30
  38. SyslogIdentifier=matrix-conduit
  39. [Install]
  40. WantedBy=multi-user.target