Skip to content
Open
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
31 changes: 31 additions & 0 deletions scripts/print_compose_status.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env bash
set -euo pipefail

# Small helper script to show the status of Base node Docker services.

COMPOSE_FILE="${COMPOSE_FILE:-docker-compose.yml}"

echo "Using compose file: ${COMPOSE_FILE}"
echo

if ! command -v docker >/dev/null 2>&1; then
echo "docker is not installed or not on PATH."
exit 1
fi

if ! command -v docker compose >/dev/null 2>&1 && ! command -v docker-compose >/dev/null 2>&1; then
echo "docker compose (or docker-compose) is not available."
exit 1
fi

if [ -f "${COMPOSE_FILE}" ]; then
echo "Listing services from ${COMPOSE_FILE}:"
else
echo "Warning: ${COMPOSE_FILE} not found in the current directory."
fi

if command -v docker compose >/dev/null 2>&1; then
docker compose ps || true
else
docker-compose ps || true
fi