add telegraf, portainer to auto-update

This commit is contained in:
2024-05-07 22:17:03 +01:00
parent e916f48254
commit 355b68e28c
5 changed files with 20 additions and 9 deletions

View File

@@ -1,13 +1,15 @@
#! /bin/bash
# must be executed from repo/docker/telegraf
# does not work using compose on portainer even if using external volume hostfs
docker pull telegraf
docker container stop telegraf
docker container remove telegraf
scriptPath=$(dirname "$0")
docker run -d --name=telegraf \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ./config/telegraf.conf:/etc/telegraf/telegraf.conf \
-v ${scriptPath}/config/telegraf.conf:/etc/telegraf/telegraf.conf \
-v /:/hostfs:ro \
-e HOST_ETC=/hostfs/etc \
-e HOST_PROC=/hostfs/proc \