37 lines
1.4 KiB
Desktop File
37 lines
1.4 KiB
Desktop File
[Unit]
|
|
Description=Podman container-metrics-prometheus.service
|
|
Documentation=man:podman-generate-systemd(1)
|
|
Wants=network.target
|
|
After=network-online.target
|
|
BindsTo=pod-metrics.service
|
|
After=pod-metrics.service
|
|
OnFailure=status-mail@%n.service
|
|
|
|
[Service]
|
|
Environment=PODMAN_SYSTEMD_UNIT=%n
|
|
Restart=on-failure
|
|
TimeoutStopSec=70
|
|
ExecStartPre=/bin/rm -f %t/container-metrics-prometheus.pid %t/container-metrics-prometheus.ctr-id
|
|
ExecStart=/usr/bin/podman run \
|
|
--conmon-pidfile %t/container-metrics-prometheus.pid \
|
|
--cidfile %t/container-metrics-prometheus.ctr-id \
|
|
--cgroups=no-conmon \
|
|
--pod-id-file %t/pod-metrics.pod-id \
|
|
--replace \
|
|
--label "io.containers.autoupdate=image" \
|
|
--log-driver=journald \
|
|
-dt \
|
|
-v {{ system_etc_root_directory }}/resolv.conf:/etc/resolv.conf:ro \
|
|
-v ./.config/service/hosts:/etc/hosts:ro \
|
|
-v ./.config/service/prometheus.yml:/etc/prometheus/prometheus.yml:U \
|
|
-v {{ services_data_directory }}/pod-metrics/data/_data:/prometheus:U \
|
|
--name=pod-metrics-prometheus \
|
|
docker.io/prom/prometheus:{{ services_service_deploy_versions.prometheus }}
|
|
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/container-metrics-prometheus.ctr-id -t 10
|
|
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/container-metrics-prometheus.ctr-id
|
|
PIDFile=%t/container-metrics-prometheus.pid
|
|
Type=forking
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target default.target
|