prometheus: use basic auth secrets

This commit is contained in:
2025-04-29 16:20:49 -04:00
parent fb98af82b6
commit 975d23f9fd
2 changed files with 5 additions and 1 deletions

View File

@@ -7,6 +7,7 @@ services:
ports: ports:
- 9090:9090 - 9090:9090
volumes: volumes:
- ./.basicauthpass:/etc/prometheus/.basicauthpass
- ./prometheus.yaml:/etc/prometheus/prometheus.yaml - ./prometheus.yaml:/etc/prometheus/prometheus.yaml
- ./web-config.yaml:/etc/prometheus/web-config.yaml - ./web-config.yaml:/etc/prometheus/web-config.yaml
- prometheus-data:/prometheus - prometheus-data:/prometheus

View File

@@ -27,3 +27,6 @@ scrape_configs:
static_configs: static_configs:
- targets: ["localhost:9090"] - targets: ["localhost:9090"]
basic_auth:
username: prometheus
password_file: /etc/prometheus/.basicauthpass