Matrix Docker Ansible eploy
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 

70 lignes
3.4 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. [Unit]
  3. Description=Matrix Mautrix Hangouts bridge
  4. {% for service in matrix_mautrix_hangouts_systemd_required_services_list %}
  5. Requires={{ service }}
  6. After={{ service }}
  7. {% endfor %}
  8. {% for service in matrix_mautrix_hangouts_systemd_wanted_services_list %}
  9. Wants={{ service }}
  10. {% endfor %}
  11. DefaultDependencies=no
  12. [Service]
  13. Type=simple
  14. Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
  15. ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop --time={{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-mautrix-hangouts matrix-mautrix-hangouts-db 2>/dev/null || true'
  16. ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-mautrix-hangouts matrix-mautrix-hangouts-db 2>/dev/null || true'
  17. ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
  18. --rm \
  19. --name=matrix-mautrix-hangouts-db \
  20. --log-driver=none \
  21. --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
  22. --cap-drop=ALL \
  23. --network={{ matrix_mautrix_hangouts_container_network }} \
  24. --mount type=bind,src={{ matrix_mautrix_hangouts_config_path }},dst=/config \
  25. --mount type=bind,src={{ matrix_mautrix_hangouts_data_path }},dst=/data \
  26. {{ matrix_mautrix_hangouts_docker_image }} \
  27. alembic -x config=/config/config.yaml upgrade head
  28. {% for network in matrix_mautrix_hangouts_container_additional_networks %}
  29. ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-mautrix-hangouts-db
  30. {% endfor %}
  31. ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} start --attach matrix-mautrix-hangouts-db
  32. ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
  33. --rm \
  34. --name=matrix-mautrix-hangouts \
  35. --log-driver=none \
  36. --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
  37. --cap-drop=ALL \
  38. --network={{ matrix_mautrix_hangouts_container_network }} \
  39. {% if matrix_mautrix_hangouts_container_http_host_bind_port %}
  40. -p {{ matrix_mautrix_hangouts_container_http_host_bind_port }}:8080 \
  41. {% endif %}
  42. --mount type=bind,src={{ matrix_mautrix_hangouts_config_path }},dst=/config \
  43. --mount type=bind,src={{ matrix_mautrix_hangouts_data_path }},dst=/data \
  44. --label-file={{ matrix_mautrix_hangouts_base_path }}/labels \
  45. {% for arg in matrix_mautrix_hangouts_container_extra_arguments %}
  46. {{ arg }} \
  47. {% endfor %}
  48. {{ matrix_mautrix_hangouts_docker_image }} \
  49. python3 -m mautrix_hangouts -c /config/config.yaml --no-update
  50. {% for network in matrix_mautrix_hangouts_container_additional_networks %}
  51. ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-mautrix-hangouts
  52. {% endfor %}
  53. ExecStart={{ devture_systemd_docker_base_host_command_docker }} start --attach matrix-mautrix-hangouts
  54. ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop --time={{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-mautrix-hangouts 2>/dev/null || true'
  55. ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-mautrix-hangouts 2>/dev/null || true'
  56. Restart=always
  57. RestartSec=30
  58. SyslogIdentifier=matrix-mautrix-hangouts
  59. [Install]
  60. WantedBy=multi-user.target