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.
 
 

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