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.
 
 

38 satır
1.6 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. [Unit]
  3. Description=Matrix registration bot
  4. {% for service in matrix_bot_matrix_registration_bot_systemd_required_services_list %}
  5. Requires={{ service }}
  6. After={{ service }}
  7. {% endfor %}
  8. {% for service in matrix_bot_matrix_registration_bot_systemd_wanted_services_list %}
  9. Wants={{ service }}
  10. {% endfor %}
  11. DefaultDependencies=no
  12. [Service]
  13. Type=simple
  14. Environment="HOME={{ matrix_systemd_unit_home_path }}"
  15. ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-bot-matrix-registration-bot 2>/dev/null || true'
  16. ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-matrix-registration-bot 2>/dev/null || true'
  17. ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-matrix-registration-bot \
  18. --log-driver=none \
  19. --cap-drop=ALL \
  20. -e "CONFIG_PATH=/config/config.yml" \
  21. --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
  22. --read-only \
  23. --mount type=bind,src={{ matrix_bot_matrix_registration_bot_config_path }},dst=/config,ro \
  24. --mount type=bind,src={{ matrix_bot_matrix_registration_bot_data_path }},dst=/data \
  25. --network={{ matrix_docker_network }} \
  26. {{ matrix_bot_matrix_registration_bot_docker_image }}
  27. ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-bot-matrix-registration-bot 2>/dev/null || true'
  28. ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-matrix-registration-bot 2>/dev/null || true'
  29. Restart=always
  30. RestartSec=30
  31. SyslogIdentifier=matrix-bot-matrix-registration-bot
  32. [Install]
  33. WantedBy=multi-user.target