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.
 
 

53 satır
2.5 KiB

  1. #jinja2: lstrip_blocks: True
  2. [Unit]
  3. Description=Matrix Commet web client
  4. {% for service in matrix_client_commet_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-commet 2>/dev/null || true'
  13. ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-client-commet 2>/dev/null || true'
  14. ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
  15. --rm \
  16. --name=matrix-client-commet \
  17. --log-driver=none \
  18. --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
  19. --cap-drop=ALL \
  20. --read-only \
  21. --network={{ matrix_client_commet_container_network }} \
  22. {% if matrix_client_commet_container_http_host_bind_port %}
  23. -p {{ matrix_client_commet_container_http_host_bind_port }}:{{ matrix_client_commet_container_port }} \
  24. {% endif %}
  25. --label-file={{ matrix_client_commet_base_path }}/labels \
  26. --env-file={{ matrix_client_commet_base_path }}/env \
  27. --tmpfs=/tmp:rw,noexec,nosuid,size=10m \
  28. --tmpfs=/var/cache/nginx:rw,mode=777 \
  29. --tmpfs=/var/run:rw,mode=777 \
  30. --mount type=bind,src={{ matrix_client_commet_config_path }}/global_config.json,dst=/usr/share/nginx/html/assets/assets/config/global_config.json,ro \
  31. {% for arg in matrix_client_commet_container_extra_arguments %}
  32. {{ arg }} \
  33. {% endfor %}
  34. {{ matrix_client_commet_container_image }}
  35. {% for network in matrix_client_commet_container_additional_networks %}
  36. ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-client-commet
  37. {% endfor %}
  38. ExecStart={{ devture_systemd_docker_base_host_command_docker }} start --attach matrix-client-commet
  39. 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-commet 2>/dev/null || true'
  40. ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-client-commet 2>/dev/null || true'
  41. Restart=always
  42. RestartSec=30
  43. SyslogIdentifier=matrix-client-commet
  44. [Install]
  45. WantedBy=multi-user.target