Matrix Docker Ansible eploy
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 

45 líneas
1.6 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. [Unit]
  3. Description=Matrix Appservice IRC server
  4. {% for service in matrix_appservice_irc_systemd_required_services_list %}
  5. Requires={{ service }}
  6. After={{ service }}
  7. {% endfor %}
  8. {% for service in matrix_appservice_irc_systemd_wanted_services_list %}
  9. Wants={{ service }}
  10. {% endfor %}
  11. [Service]
  12. Type=simple
  13. ExecStartPre=-{{ matrix_host_command_docker }} kill matrix-appservice-irc
  14. ExecStartPre=-{{ matrix_host_command_docker }} rm matrix-appservice-irc
  15. # Intentional delay, so that the homeserver (we likely depend on) can manage to start.
  16. ExecStartPre={{ matrix_host_command_sleep }} 5
  17. ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-appservice-irc \
  18. --log-driver=none \
  19. --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
  20. --cap-drop=ALL \
  21. --network={{ matrix_docker_network }} \
  22. {% if matrix_appservice_irc_container_http_host_bind_port %}
  23. -p {{ matrix_appservice_irc_container_http_host_bind_port }}:9999 \
  24. {% endif %}
  25. -v {{ matrix_appservice_irc_config_path }}:/config:z \
  26. -v {{ matrix_appservice_irc_data_path }}:/data:z \
  27. {% for arg in matrix_appservice_irc_container_extra_arguments %}
  28. {{ arg }} \
  29. {% endfor %}
  30. --entrypoint=/bin/bash \
  31. {{ matrix_appservice_irc_docker_image }} \
  32. -c 'node app.js -c /config/config.yaml -f /config/registration.yaml -p 9999'
  33. ExecStop=-{{ matrix_host_command_docker }} kill matrix-appservice-irc
  34. ExecStop=-{{ matrix_host_command_docker }} rm matrix-appservice-irc
  35. Restart=always
  36. RestartSec=30
  37. SyslogIdentifier=matrix-appservice-irc
  38. [Install]
  39. WantedBy=multi-user.target