Skip to content

Commit

Permalink
older docker version command does not support json
Browse files Browse the repository at this point in the history
  • Loading branch information
mnaamani committed Jul 19, 2023
1 parent 45c6ce5 commit 7c7939b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions query-node/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,14 @@ docker-compose -f ../docker-compose.yml up -d hydra-indexer-gateway
docker-compose -f ../docker-compose.yml up -d processor

# Wait for processor db bootstrapping to complete, can take a bit longer on docker desktop
DOCKER_PLATFORM=$(docker version --format json | jq -r ".Server.Platform.Name")
[[ "$DOCKER_PLATFORM" = "Docker Desktop"* ]] && echo "Waiting for processor to be ready..." && sleep 30
docker version
docker version --format json || \
DOCKER_PLATFORM=$(docker version --format json | jq -r ".Server.Platform.Name") && \
[[ "$DOCKER_PLATFORM" = "Docker Desktop"* ]] && \
echo "1. Waiting for processor to be ready..." && sleep 30

DOCKER_PLATFORM=$(docker version | grep "Server: Docker Desktop"); ! [[ -z $DOCKER_PLATFORM ]] && \
echo "2. Waiting for processor to be ready..." && sleep 30

# Start graphql-server
docker-compose -f ../docker-compose.yml up -d graphql-server
Expand Down

0 comments on commit 7c7939b

Please sign in to comment.