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.
 
 

44 righe
1.8 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. [Unit]
  3. Description=Matrix Element server
  4. {% for service in matrix_client_element_systemd_required_services_list %}
  5. Requires={{ service }}
  6. After={{ service }}
  7. {% endfor %}
  8. [Service]
  9. Type=simple
  10. ExecStartPre=-{{ matrix_host_command_docker }} kill matrix-client-element
  11. ExecStartPre=-{{ matrix_host_command_docker }} rm matrix-client-element
  12. ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-client-element \
  13. --log-driver=none \
  14. --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
  15. --cap-drop=ALL \
  16. --read-only \
  17. --network={{ matrix_docker_network }} \
  18. {% if matrix_client_element_container_http_host_bind_port %}
  19. -p {{ matrix_client_element_container_http_host_bind_port }}:8080 \
  20. {% endif %}
  21. --tmpfs=/tmp:rw,noexec,nosuid,size=10m \
  22. --mount type=bind,src={{ matrix_client_element_data_path }}/nginx.conf,dst=/etc/nginx/nginx.conf,ro \
  23. --mount type=bind,src={{ matrix_client_element_data_path }}/config.json,dst=/app/config.json,ro \
  24. --mount type=bind,src={{ matrix_client_element_data_path }}/config.json,dst=/app/config.{{ matrix_server_fqn_element }}.json,ro \
  25. {% if matrix_client_element_embedded_pages_home_path is not none %}
  26. --mount type=bind,src={{ matrix_client_element_data_path }}/home.html,dst=/app/home.html,ro \
  27. {% endif %}
  28. --mount type=bind,src={{ matrix_client_element_data_path }}/welcome.html,dst=/app/welcome.html,ro \
  29. {% for arg in matrix_client_element_container_extra_arguments %}
  30. {{ arg }} \
  31. {% endfor %}
  32. {{ matrix_client_element_docker_image }}
  33. ExecStop=-{{ matrix_host_command_docker }} kill matrix-client-element
  34. ExecStop=-{{ matrix_host_command_docker }} rm matrix-client-element
  35. Restart=always
  36. RestartSec=30
  37. SyslogIdentifier=matrix-client-element
  38. [Install]
  39. WantedBy=multi-user.target