After configuring VPS health4

This commit is contained in:
Your Name 2026-11-01 18:27:19 +02:00
parent a9e5693867
commit 2dac0d0103
2 changed files with 11 additions and 0 deletions

View File

@ -514,6 +514,10 @@ services:
image: prom/prometheus:v2.55.1 image: prom/prometheus:v2.55.1
container_name: prediqo_prometheus container_name: prediqo_prometheus
restart: unless-stopped restart: unless-stopped
# Justified exception: image USER=nobody but Docker named volumes are root-owned
# on first create → process exits 1 (permission denied) in a restart loop.
# Running as root here only writes TSDB data; no ports published.
user: root
command: command:
- --config.file=/etc/prometheus/prometheus.yml - --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.path=/prometheus - --storage.tsdb.path=/prometheus

View File

@ -59,6 +59,13 @@ sudo docker exec crypto_wallet_api node -e "fetch('http://prometheus:9090/-/heal
sudo ss -tlnp | grep -E '9090|9100|8080' || echo "OK: ports monitoring non exposés" sudo ss -tlnp | grep -E '9090|9100|8080' || echo "OK: ports monitoring non exposés"
``` ```
Si `prediqo_prometheus` est en `Restarting`, regarder les logs (`permission denied` sur `/prometheus` = volume). Le service tourne en `user: root` pour écrire le volume ; sinon :
```bash
sudo docker run --rm -v games-project_prometheus_data:/prometheus busybox chown -R 65534:65534 /prometheus
sudo npm run monitoring:up
```
## Variables d’environnement ## Variables d’environnement
| Variable | Défaut | Rôle | | Variable | Défaut | Rôle |