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

36 lines
1.3 KiB
Desktop File

[Unit]
Description=Podman container-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/container-dash-grafana.pid %t/container-dash-grafana.ctr-id
ExecStart=/usr/bin/podman run \
--conmon-pidfile %t/container-dash-grafana.pid \
--cidfile %t/container-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/container-dash-grafana.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/container-dash-grafana.ctr-id
PIDFile=%t/container-dash-grafana.pid
Type=forking
[Install]
WantedBy=multi-user.target default.target