resolve install problem

This commit is contained in:
lamya1baidouri 2025-02-03 09:40:54 +01:00
parent 066defd076
commit 51fedc2294

View file

@ -36,9 +36,15 @@ jobs:
- name: Install Docker Compose - name: Install Docker Compose
run: | run: |
# Installation de Docker Compose via pip (méthode alternative)
sudo apt-get update sudo apt-get update
sudo apt-get install -y docker-compose-plugin sudo apt-get install -y python3-pip
docker compose version sudo pip3 install docker-compose
docker-compose version
# Vérifier que Docker est en cours d'exécution
sudo systemctl status docker || true
sudo docker info
- name: Create monitoring directories - name: Create monitoring directories
run: | run: |
@ -48,7 +54,7 @@ jobs:
- name: Start Monitoring Stack - name: Start Monitoring Stack
run: | run: |
docker compose up -d prometheus grafana powerapi node-exporter docker-compose up -d prometheus grafana powerapi node-exporter
echo "Waiting for services to be healthy..." echo "Waiting for services to be healthy..."
timeout 60s bash -c 'until curl -s -f http://localhost:9090/-/healthy; do sleep 2; echo "Waiting for Prometheus..."; done' timeout 60s bash -c 'until curl -s -f http://localhost:9090/-/healthy; do sleep 2; echo "Waiting for Prometheus..."; done'
timeout 60s bash -c 'until curl -s -f http://localhost:3000/api/health; do sleep 2; echo "Waiting for Grafana..."; done' timeout 60s bash -c 'until curl -s -f http://localhost:3000/api/health; do sleep 2; echo "Waiting for Grafana..."; done'
@ -147,5 +153,5 @@ jobs:
- name: Cleanup - name: Cleanup
if: always() if: always()
run: | run: |
docker compose down --volumes --remove-orphans || echo "Failed to stop containers" docker-compose down --volumes --remove-orphans || echo "Failed to stop containers"
docker system prune -f || echo "Failed to prune Docker system" docker system prune -f || echo "Failed to prune Docker system"