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

39 строки
1.6 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. [Unit]
  3. Description=Matrix Goofys media store
  4. After=docker.service
  5. Requires=docker.service
  6. DefaultDependencies=no
  7. [Service]
  8. Type=simple
  9. ExecStartPre=-{{ matrix_host_command_docker }} kill %n
  10. ExecStartPre=-{{ matrix_host_command_docker }} rm %n
  11. ExecStart={{ matrix_host_command_docker }} run --rm --name %n \
  12. --log-driver=none \
  13. --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
  14. --mount type=bind,src=/etc/passwd,dst=/etc/passwd,ro \
  15. --mount type=bind,src=/etc/group,dst=/etc/group,ro \
  16. --mount type=bind,src={{ matrix_synapse_media_store_path }},dst=/s3,bind-propagation=shared \
  17. --security-opt apparmor:unconfined \
  18. --cap-add mknod \
  19. --cap-add sys_admin \
  20. --device=/dev/fuse \
  21. --env-file={{ matrix_synapse_config_dir_path }}/env-goofys \
  22. --entrypoint /bin/sh \
  23. {{ matrix_s3_goofys_docker_image }} \
  24. -c 'goofys -f{% if not matrix_s3_media_store_custom_endpoint_enabled %} --storage-class=STANDARD_IA{% endif %}{% if matrix_s3_media_store_custom_endpoint_enabled %} --endpoint={{ matrix_s3_media_store_custom_endpoint }}{% endif %} --region {{ matrix_s3_media_store_region }} --stat-cache-ttl 60m0s --type-cache-ttl 60m0s --dir-mode 0700 --file-mode 0700 {{ matrix_s3_media_store_bucket_name }} /s3'
  25. TimeoutStartSec=5min
  26. ExecStop=-{{ matrix_host_command_docker }} stop %n
  27. ExecStop=-{{ matrix_host_command_docker }} kill %n
  28. ExecStop=-{{ matrix_host_command_docker }} rm %n
  29. ExecStop=-{{ matrix_host_command_fusermount }} -u {{ matrix_synapse_media_store_path }}
  30. Restart=always
  31. RestartSec=5
  32. SyslogIdentifier=matrix-goofys
  33. [Install]
  34. WantedBy=multi-user.target