Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 

49 строки
1.5 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. --network={{ matrix_docker_network }} \
  29. -p 8448:8448 \
  30. {% if not matrix_nginx_proxy_enabled %}
  31. -p 127.0.0.1:8008:8008 \
  32. {% endif %}
  33. -v {{ matrix_synapse_config_dir_path }}:/data \
  34. -v {{ matrix_synapse_run_path }}:/matrix-run \
  35. -v {{ matrix_synapse_storage_path }}:/matrix-storage:slave \
  36. {% for volume in matrix_synapse_container_additional_volumes %}
  37. -v {{ volume.src }}:{{ volume.dst }}:{{ volume.options }} \
  38. {% endfor %}
  39. -e SYNAPSE_CONFIG_PATH=/data/homeserver.yaml \
  40. {{ matrix_docker_image_synapse }}
  41. ExecStop=-/usr/bin/docker kill matrix-synapse
  42. ExecStop=-/usr/bin/docker rm matrix-synapse
  43. Restart=always
  44. RestartSec=30
  45. [Install]
  46. WantedBy=multi-user.target