ansible-edda/playbooks/roles/services/deploy/dash/templates/systemd/pod-dash-grafana.service

36 lines
1.2 KiB
Desktop File

[Unit]
Description=Podman pod-dash-grafana.service
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
BindsTo=pod-dash.service
After=pod-dash.service
OnFailure=status-mail@%n.service
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/pod-dash-grafana.pid %t/pod-dash-grafana.ctr-id
ExecStart=/usr/bin/podman run \
--conmon-pidfile %t/pod-dash-grafana.pid \
--cidfile %t/pod-dash-grafana.ctr-id \
--cgroups=no-conmon \
--pod-id-file %t/pod-dash.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 {{ services_data_directory }}/pod-dash/data/_data:/var/lib/grafana:U \
--name=pod-dash-grafana \
docker.io/grafana/grafana:{{ services_service_deploy_versions.grafana }}
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/pod-dash-grafana.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/pod-dash-grafana.ctr-id
PIDFile=%t/pod-dash-grafana.pid
Type=forking
[Install]
WantedBy=multi-user.target default.target