This commit is contained in:
2025-12-02 07:37:19 +01:00
parent 319deddbf2
commit a4cec02c17
2 changed files with 45 additions and 0 deletions

View File

@@ -99,3 +99,26 @@ WantedBy=multi-user.target
sudo systemctl enable --now prometheus
sudo systemctl status prometheus
```
## Docker
prometheus:
container_name: r5a10-prometheus
image: prom/prometheus:${PROMETHEUS_VERSION:-v2.53.0}
restart: no
command:
- '--config.file=/etc/prometheus/prometheus.yml'
configs:
- source: prometheus_config
target: /etc/prometheus/prometheus.yml
volumes:
- prometheus:/prometheus
- /var/run/docker.sock:/var/run/docker.sock:ro
ports:
- 9090:9090
extra_hosts:
- host.docker.internal=host-gateway
#/etc/docker/daemon.json
#{
# "metrics-addr": "0.0.0.0:9323"
#}