Matrix Docker Ansible eploy
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 

44 wiersze
1.4 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. [Unit]
  3. Description=Matrix riot-web server
  4. {% for service in matrix_riot_web_systemd_required_services_list %}
  5. Requires={{ service }}
  6. After={{ service }}
  7. {% endfor %}
  8. [Service]
  9. Type=simple
  10. ExecStartPre=-/usr/bin/docker kill matrix-riot-web
  11. ExecStartPre=-/usr/bin/docker rm matrix-riot-web
  12. ExecStart=/usr/bin/docker run --rm --name matrix-riot-web \
  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_riot_web_container_http_host_bind_port %}
  19. -p {{ matrix_riot_web_container_http_host_bind_port }}:8080 \
  20. {% endif %}
  21. --tmpfs=/tmp:rw,noexec,nosuid,size=10m \
  22. -v {{ matrix_riot_web_data_path }}/nginx.conf:/etc/nginx/nginx.conf:ro \
  23. -v /dev/null:/etc/nginx/conf.d/default.conf:ro \
  24. -v {{ matrix_riot_web_data_path }}/config.json:/app/config.json:ro \
  25. {% if matrix_riot_web_embedded_pages_home_path is not none %}
  26. -v {{ matrix_riot_web_data_path }}/home.html:/app/home.html:ro \
  27. {% endif %}
  28. -v {{ matrix_riot_web_data_path }}/welcome.html:/app/welcome.html:ro \
  29. {% for arg in matrix_riot_web_container_extra_arguments %}
  30. {{ arg }} \
  31. {% endfor %}
  32. {{ matrix_riot_web_docker_image }}
  33. ExecStop=-/usr/bin/docker kill matrix-riot-web
  34. ExecStop=-/usr/bin/docker rm matrix-riot-web
  35. Restart=always
  36. RestartSec=30
  37. SyslogIdentifier=matrix-riot-web
  38. [Install]
  39. WantedBy=multi-user.target