This commit is contained in:
2025-12-04 14:35:14 +01:00
parent 60c55e1755
commit 8ff43d0e7f

34
tp2.md
View File

@@ -108,16 +108,16 @@ scrape_configs:
``` ```
```shell ```shell
docker run --detach --name prometheus \ docker run --detach --name prometheus ^
--network tp_net \ --network tp_net ^
-p "9090:9090" \ -p "9090:9090" ^
-v prometheus:/prometheus \ -v prometheus:/prometheus ^
-v ./prometheus.yml:/etc/prometheus/prometheus.yml \ -v ./prometheus.yml:/etc/prometheus/prometheus.yml ^
-v ./prometheus:/etc/prometheus/targets \ -v ./prometheus:/etc/prometheus/targets ^
-v /var/run/docker.sock:/var/run/docker.sock:ro \ -v /var/run/docker.sock:/var/run/docker.sock:ro ^
-l "caddy=prometheus.localhost" \ -l "caddy=prometheus.localhost" ^
-l "caddy.reverse_proxy={{upstreams 9090}}" \ -l "caddy.reverse_proxy={{upstreams 9090}}" ^
-l "caddy.tls=internal" \ -l "caddy.tls=internal" ^
prom/prometheus:v3.8.0 prom/prometheus:v3.8.0
``` ```
@@ -126,13 +126,13 @@ docker run --detach --name prometheus \
```shell ```shell
docker run --detach --name grafana ^ docker run --detach --name grafana ^
--network tp_net ^ --network tp_net ^
-e "GF_SECURITY_ADMIN_USER=admin" ^s -e "GF_SECURITY_ADMIN_USER=admin" ^
-e "GF_SECURITY_ADMIN_PASSWORD=geii2025" ^s -e "GF_SECURITY_ADMIN_PASSWORD=geii2025" ^
-e "GF_USERS_ALLOW_SIGN_UP=false" ^s -e "GF_USERS_ALLOW_SIGN_UP=false" ^
-e "GF_USERS_DEFAULT_THEME=system" ^s -e "GF_USERS_DEFAULT_THEME=system" ^
--label "caddy=grafana.localhost" ^s --label "caddy=grafana.localhost" ^
--label "caddy.reverse_proxy={{upstreams 3000}}" ^s --label "caddy.reverse_proxy={{upstreams 3000}}" ^
--label "caddy.tls=internal" ^s --label "caddy.tls=internal" ^
grafana/grafana:12.1 grafana/grafana:12.1
``` ```