Matrix Docker Ansible eploy
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 

46 righe
1.7 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. [Unit]
  3. Description=Matrix Mx Puppet Twitter bridge
  4. {% for service in matrix_mx_puppet_twitter_systemd_required_services_list %}
  5. Requires={{ service }}
  6. After={{ service }}
  7. {% endfor %}
  8. {% for service in matrix_mx_puppet_twitter_systemd_wanted_services_list %}
  9. Wants={{ service }}
  10. {% endfor %}
  11. DefaultDependencies=no
  12. [Service]
  13. Type=simple
  14. ExecStartPre=-{{ matrix_host_command_docker }} kill matrix-mx-puppet-twitter
  15. ExecStartPre=-{{ matrix_host_command_docker }} rm matrix-mx-puppet-twitter
  16. # Intentional delay, so that the homeserver (we likely depend on) can manage to start.
  17. ExecStartPre={{ matrix_host_command_sleep }} 5
  18. ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mx-puppet-twitter \
  19. --log-driver=none \
  20. --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
  21. --cap-drop=ALL \
  22. --network={{ matrix_docker_network }} \
  23. {% if matrix_mx_puppet_twitter_container_http_host_bind_port %}
  24. -p {{ matrix_mx_puppet_twitter_container_http_host_bind_port }}:{{ matrix_mx_puppet_twitter_appservice_port }} \
  25. {% endif %}
  26. -e CONFIG_PATH=/config/config.yaml \
  27. -e REGISTRATION_PATH=/config/registration.yaml \
  28. -v {{ matrix_mx_puppet_twitter_config_path }}:/config:z \
  29. -v {{ matrix_mx_puppet_twitter_data_path }}:/data:z \
  30. {% for arg in matrix_mx_puppet_twitter_container_extra_arguments %}
  31. {{ arg }} \
  32. {% endfor %}
  33. {{ matrix_mx_puppet_twitter_docker_image }}
  34. ExecStop=-{{ matrix_host_command_docker }} kill matrix-mx-puppet-twitter
  35. ExecStop=-{{ matrix_host_command_docker }} rm matrix-mx-puppet-twitter
  36. Restart=always
  37. RestartSec=30
  38. SyslogIdentifier=matrix-mx-puppet-twitter
  39. [Install]
  40. WantedBy=multi-user.target