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.
 
 

43 líneas
1.7 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. [Unit]
  3. Description=matrix-prometheus-postgres-exporter
  4. {% for service in matrix_prometheus_postgres_exporter_systemd_required_services_list %}
  5. Requires={{ service }}
  6. After={{ service }}
  7. {% endfor %}
  8. {% for service in matrix_prometheus_postgres_exporter_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-prometheus-postgres-exporter 2>/dev/null || true'
  16. ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-prometheus-postgres-exporter 2>/dev/null || true'
  17. ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-prometheus-postgres-exporter \
  18. --log-driver=none \
  19. --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
  20. --cap-drop=ALL \
  21. --read-only \
  22. {% for arg in matrix_prometheus_postgres_exporter_container_extra_arguments %}
  23. {{ arg }} \
  24. {% endfor %}
  25. --network={{ matrix_docker_network }} \
  26. {% if matrix_prometheus_postgres_exporter_container_http_host_bind_port %}
  27. -p {{ matrix_prometheus_postgres_exporter_container_http_host_bind_port }}:{{matrix_prometheus_postgres_exporter_port}} \
  28. {% endif %}
  29. --pid=host \
  30. {{ matrix_prometheus_postgres_exporter_docker_image }}
  31. ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-prometheus-postgres-exporter 2>/dev/null || true'
  32. ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-prometheus-postgres-exporter 2>/dev/null || true'
  33. Restart=always
  34. RestartSec=30
  35. SyslogIdentifier=matrix-prometheus-postgres-exporter
  36. [Install]
  37. WantedBy=multi-user.target