Files
docker-observation/docker-compose.yml
2025-11-04 02:02:16 -06:00

47 lines
1.2 KiB
YAML

services:
portainer-agent:
image: portainer/agent
container_name: portainer_agent
restart: always
ports:
- 9001:9001
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker/volumes:/var/lib/docker/volumes
telegraf-docker:
image: telegraf
container_name: telegraf-docker
restart: always
uts: host
user: telegraf:${DOCKER_GUID}
env_file:
- .env
volumes:
- ./telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro
- /var/run/docker.sock:/var/run/docker.sock
alloy:
image: grafana/alloy
container_name: grafana-alloy
restart: unless-stopped
volumes:
- ./grafana-alloy/config.alloy:/etc/alloy/config.alloy
- /var/run/docker.sock:/var/run/docker.sock
command:
- run
- --server.http.listen-addr=0.0.0.0:12345
- --storage.path=/var/lib/alloy/data
- /etc/alloy/config.alloy
watchtower:
image: containrrr/watchtower
container_name: watchtower
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
environment:
WATCHTOWER_SCHEDULE: "0 0 3 * * *"