feat: Add basic auth on Prometheus

This commit is contained in:
William 2022-12-30 10:10:46 +01:00
parent 414eb2e584
commit 794ff3abd0
4 changed files with 7 additions and 1 deletions

View File

@ -1 +1,2 @@
prometheus.yml
web.yml

View File

@ -5,5 +5,6 @@
```bash
cp .env.example .env # then edit
cp prometheus.example.yml prometheus.yml # then edit
cp web.example.yml web.yml # then edit
docker compose up -d
```

View File

@ -38,9 +38,11 @@ services:
restart: unless-stopped
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- ./web.yml:/etc/prometheus/web.yml
- prometheus-data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--web.config.file=/etc/prometheus/web.yml'
- '--storage.tsdb.path=/prometheus'
- '--storage.tsdb.retention.time=365d'
labels:

View File

@ -0,0 +1,2 @@
basic_auth_users:
admin: $2b$12$hNf2lSsxfm0.i4a.1kVpSOVyBCfIB51VRjgBUyv6kdnyTlgWj81Ay # test