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.
 
 

52 wiersze
1.6 KiB

  1. [Unit]
  2. Description=Matrix Synapse server
  3. After=docker.service
  4. Requires=docker.service
  5. {% if not matrix_postgres_use_external %}
  6. Requires=matrix-postgres.service
  7. After=matrix-postgres.service
  8. {% endif %}
  9. {% if matrix_s3_media_store_enabled %}
  10. After=matrix-goofys.service
  11. Requires=matrix-goofys.service
  12. {% endif %}
  13. {% if matrix_mailer_enabled %}
  14. Wants=matrix-mailer.service
  15. {% endif %}
  16. Wants=matrix-coturn.service
  17. [Service]
  18. Type=simple
  19. ExecStartPre=-/usr/bin/docker kill matrix-synapse
  20. ExecStartPre=-/usr/bin/docker rm matrix-synapse
  21. {% if matrix_s3_media_store_enabled %}
  22. # Allow for some time before starting, so that media store can mount.
  23. # Mounting can happen later too, but if we start writing,
  24. # we'd write files to the local filesystem and fusermount will complain.
  25. ExecStartPre=/bin/sleep 5
  26. {% endif %}
  27. ExecStart=/usr/bin/docker run --rm --name matrix-synapse \
  28. --log-driver=none \
  29. --env-file={{ matrix_environment_variables_data_path }}/synapse \
  30. --network={{ matrix_docker_network }} \
  31. {% if matrix_synapse_federation_enabled %}
  32. -p 8448:8448 \
  33. {% endif %}
  34. {% if not matrix_nginx_proxy_enabled %}
  35. -p 127.0.0.1:8008:8008 \
  36. {% endif %}
  37. -v {{ matrix_synapse_config_dir_path }}:/data \
  38. -v {{ matrix_synapse_run_path }}:/matrix-run \
  39. -v {{ matrix_synapse_storage_path }}:/matrix-storage:slave \
  40. {% for volume in matrix_synapse_container_additional_volumes %}
  41. -v {{ volume.src }}:{{ volume.dst }}:{{ volume.options }} \
  42. {% endfor %}
  43. {{ matrix_synapse_docker_image }}
  44. ExecStop=-/usr/bin/docker kill matrix-synapse
  45. ExecStop=-/usr/bin/docker rm matrix-synapse
  46. Restart=always
  47. RestartSec=30
  48. [Install]
  49. WantedBy=multi-user.target