Skip to content

Commit 6523acf

Browse files
Switch docker-compose version (#4)
* Switch docker-compose version * Hack around CI --------- Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>
1 parent 214cb62 commit 6523acf

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
.PHONY: up down restart logs ps clean grafana prometheus loki tempo influxdb help
22

33
PROJECT_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
@@ -13,7 +15,7 @@ start:
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)); \
@@ -31,7 +33,7 @@ start:
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

0 commit comments

Comments
 (0)