Matrix Docker Ansible eploy
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 

50 řádky
2.4 KiB

  1. #jinja2: lstrip_blocks: True
  2. [Unit]
  3. Description=Matrix FluffyChat Web server
  4. {% for service in matrix_client_fluffychat_systemd_required_services_list %}
  5. Requires={{ service }}
  6. After={{ service }}
  7. {% endfor %}
  8. DefaultDependencies=no
  9. [Service]
  10. Type=simple
  11. Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
  12. 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-client-fluffychat 2>/dev/null || true'
  13. ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-client-fluffychat 2>/dev/null || true'
  14. ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
  15. --rm \
  16. --name=matrix-client-fluffychat \
  17. --log-driver=none \
  18. --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
  19. --cap-drop=ALL \
  20. --read-only \
  21. --network={{ matrix_client_fluffychat_container_network }} \
  22. {% if matrix_client_fluffychat_container_http_host_bind_port %}
  23. -p {{ matrix_client_fluffychat_container_http_host_bind_port }}:{{ matrix_client_fluffychat_container_http_port }} \
  24. {% endif %}
  25. --label-file={{ matrix_client_fluffychat_base_path }}/labels \
  26. --mount type=bind,src={{ matrix_client_fluffychat_config_path }}/config.json,dst=/var/public/config.json,ro \
  27. --tmpfs=/tmp:rw,noexec,nosuid,size=10m \
  28. {% for arg in matrix_client_fluffychat_container_extra_arguments %}
  29. {{ arg }} \
  30. {% endfor %}
  31. {{ matrix_client_fluffychat_container_image }}
  32. {% for network in matrix_client_fluffychat_container_additional_networks %}
  33. ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-client-fluffychat
  34. {% endfor %}
  35. ExecStart={{ devture_systemd_docker_base_host_command_docker }} start --attach matrix-client-fluffychat
  36. 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-client-fluffychat 2>/dev/null || true'
  37. ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-client-fluffychat 2>/dev/null || true'
  38. Restart=always
  39. RestartSec=30
  40. SyslogIdentifier=matrix-client-fluffychat
  41. [Install]
  42. WantedBy=multi-user.target