diff --git a/docker-compose.yml b/docker-compose.yml index 338fd380..83a2ab02 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -514,6 +514,10 @@ services: image: prom/prometheus:v2.55.1 container_name: prediqo_prometheus 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: - --config.file=/etc/prometheus/prometheus.yml - --storage.tsdb.path=/prometheus diff --git a/docs/VPS-MONITORING.md b/docs/VPS-MONITORING.md index df45cb1e..d2c0c61f 100644 --- a/docs/VPS-MONITORING.md +++ b/docs/VPS-MONITORING.md @@ -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" ``` +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 | Variable | Défaut | Rôle |