Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
.PHONY: up down restart logs ps clean grafana prometheus loki tempo influxdb help

PROJECT_ROOT := $(shell git rev-parse --show-toplevel)
DOCKER_COMPOSE := docker compose
# Detect which docker compose command is available
# docker-setup-buildx doesn’t install docker-compose v1, and the GitHub Actions runner no longer includes it.
DOCKER_COMPOSE := $(shell if command -v docker-compose >/dev/null 2>&1; then echo "docker-compose"; else echo "docker compose"; fi)

# Default target
.DEFAULT_GOAL := help
Expand All @@ -13,7 +15,7 @@ start:
@echo "Waiting for all services to become healthy..."
@timeout=60; \
while [ $$timeout -gt 0 ]; do \
if docker compose ps --format json | jq -e 'select(.Health != "healthy") | .Name' > /dev/null 2>&1; then \
if $(DOCKER_COMPOSE) ps --format json | jq -e 'select(.Health != "healthy") | .Name' > /dev/null 2>&1; then \
printf "\r⏳ Waiting for services... ($$timeout seconds remaining) "; \
sleep 1; \
timeout=$$((timeout - 1)); \
Expand All @@ -31,7 +33,7 @@ start:
done; \
echo ""; \
echo "⚠️ Timeout waiting for services to become healthy"; \
echo "Check service status with: docker compose ps"; \
echo "Check service status with: $DOCKER_COMPOSE ps"; \
echo "View logs with: make logs"; \
exit 1

Expand Down