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.
 
 

50 satır
1.9 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. [Unit]
  3. Description=Matrix Go-NEB bot
  4. {% for service in matrix_bot_go_neb_systemd_required_services_list %}
  5. Requires={{ service }}
  6. After={{ service }}
  7. {% endfor %}
  8. {% for service in matrix_bot_go_neb_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-go-neb 2>/dev/null'
  16. ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-go-neb 2>/dev/null'
  17. ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-go-neb \
  18. --log-driver=none \
  19. --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
  20. --cap-drop=ALL \
  21. --read-only \
  22. --network={{ matrix_docker_network }} \
  23. {% if matrix_bot_go_neb_container_http_host_bind_port %}
  24. -p {{ matrix_bot_go_neb_container_http_host_bind_port }}:4050 \
  25. {% endif %}
  26. -e 'BIND_ADDRESS=:4050' \
  27. -e 'DATABASE_TYPE={{ matrix_bot_go_neb_database_engine }}' \
  28. -e 'BASE_URL=https://{{ matrix_server_fqn_bot_go_neb }}' \
  29. -e 'CONFIG_FILE={{ matrix_bot_go_neb_config_path_in_container }}' \
  30. -e 'DATABASE_URL={{ matrix_bot_go_neb_storage_database }}' \
  31. --mount type=bind,src={{ matrix_bot_go_neb_config_path }},dst=/config,ro \
  32. --mount type=bind,src={{ matrix_bot_go_neb_data_path }},dst=/data \
  33. --entrypoint=/bin/sh \
  34. {% for arg in matrix_bot_go_neb_container_extra_arguments %}
  35. {{ arg }} \
  36. {% endfor %}
  37. {{ matrix_bot_go_neb_docker_image }} \
  38. -c "go-neb /config/config.yaml"
  39. ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-bot-go-neb 2>/dev/null'
  40. ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-go-neb 2>/dev/null'
  41. Restart=always
  42. RestartSec=30
  43. SyslogIdentifier=matrix-bot-go-neb
  44. [Install]
  45. WantedBy=multi-user.target