File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 11.PHONY : up down restart logs ps clean grafana prometheus loki tempo influxdb help
22
33PROJECT_ROOT := $(shell git rev-parse --show-toplevel)
4- DOCKER_COMPOSE := docker compose
4+ # Detect which docker compose command is available
5+ # docker-setup-buildx doesn’t install docker-compose v1, and the GitHub Actions runner no longer includes it.
6+ DOCKER_COMPOSE := $(shell if command -v docker-compose >/dev/null 2>&1; then echo "docker-compose"; else echo "docker compose"; fi)
57
68# Default target
79.DEFAULT_GOAL := help
1315 @echo " Waiting for all services to become healthy..."
1416 @timeout=60; \
1517 while [ $$ timeout -gt 0 ]; do \
16- if docker compose ps --format json | jq -e ' select(.Health != "healthy") | .Name' > /dev/null 2>&1 ; then \
18+ if $( DOCKER_COMPOSE ) ps --format json | jq -e ' select(.Health != "healthy") | .Name' > /dev/null 2>&1 ; then \
1719 printf " \r⏳ Waiting for services... ($$ timeout seconds remaining) " ; \
1820 sleep 1; \
1921 timeout=$$((timeout - 1 ) ); \
3133 done ; \
3234 echo " " ; \
3335 echo " ⚠️ Timeout waiting for services to become healthy" ; \
34- echo " Check service status with: docker compose ps" ; \
36+ echo " Check service status with: $DOCKER_COMPOSE ps" ; \
3537 echo " View logs with: make logs" ; \
3638 exit 1
3739
You can’t perform that action at this time.
0 commit comments