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
1.7 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. --network={{ matrix_docker_network }} \
  30. -e SYNAPSE_CONFIG_PATH=/data/homeserver.yaml \
  31. -e SYNAPSE_CACHE_FACTOR={{ matrix_synapse_cache_factor }} \
  32. {% if matrix_synapse_federation_enabled %}
  33. -p 8448:8448 \
  34. {% endif %}
  35. {% if matrix_synapse_container_expose_client_server_api_port %}
  36. -p 127.0.0.1:8008:8008 \
  37. {% endif %}
  38. -v {{ matrix_synapse_config_dir_path }}:/data \
  39. -v {{ matrix_synapse_run_path }}:/matrix-run \
  40. -v {{ matrix_synapse_base_path }}/storage:/matrix-media-store-parent:slave \
  41. {% for volume in matrix_synapse_container_additional_volumes %}
  42. -v {{ volume.src }}:{{ volume.dst }}:{{ volume.options }} \
  43. {% endfor %}
  44. {{ matrix_synapse_docker_image }}
  45. ExecStop=-/usr/bin/docker kill matrix-synapse
  46. ExecStop=-/usr/bin/docker rm matrix-synapse
  47. Restart=always
  48. RestartSec=30
  49. [Install]
  50. WantedBy=multi-user.target