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.
 
 

46 wiersze
1.4 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. After=matrix-coturn.service
  14. Requires=matrix-coturn.service
  15. [Service]
  16. Type=simple
  17. ExecStartPre=-/usr/bin/docker kill matrix-synapse
  18. ExecStartPre=-/usr/bin/docker rm matrix-synapse
  19. {% if matrix_s3_media_store_enabled %}
  20. # Allow for some time before starting, so that media store can mount.
  21. # Mounting can happen later too, but if we start writing,
  22. # we'd write files to the local filesystem and fusermount will complain.
  23. ExecStartPre=/bin/sleep 5
  24. {% endif %}
  25. ExecStart=/usr/bin/docker run --rm --name matrix-synapse \
  26. {% if not matrix_postgres_use_external %}
  27. --link matrix-postgres:{{ matrix_postgres_connection_hostname }} \
  28. {% endif %}
  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. -e SYNAPSE_CONFIG_PATH=/data/homeserver.yaml \
  37. {{ docker_matrix_image }}
  38. ExecStop=-/usr/bin/docker kill matrix-synapse
  39. ExecStop=-/usr/bin/docker rm matrix-synapse
  40. Restart=always
  41. RestartSec=30
  42. [Install]
  43. WantedBy=multi-user.target