From: Kai Moritz Date: Sun, 5 May 2024 07:58:42 +0000 (+0200) Subject: Switched `README.sh` to the build-in version of Docker Compose X-Git-Tag: wordcount-1.0.0~2 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=2a830ecf3b311b2012243a875c93c1206fb99ba2;p=demos%2Fkafka%2Fwordcount Switched `README.sh` to the build-in version of Docker Compose --- diff --git a/README.sh b/README.sh index b6f9a3c..b8005ab 100755 --- a/README.sh +++ b/README.sh @@ -10,7 +10,7 @@ QUERY=juplo/wordcount--query:1.0.4 if [ "$1" = "cleanup" ] then - docker-compose down -v --remove-orphans + docker compose down -v --remove-orphans docker image rm $FORTUNE docker image rm $RECORDER docker image rm $USERS @@ -33,7 +33,7 @@ if [[ ]] then mvn clean package || exit - docker-compose rm -svf recorder users splitter counter top10 query + docker compose rm -svf recorder users splitter counter top10 query ( cd fortune; ./README.sh $FORTUNE; ) mvn -f recorder/pom.xml docker:build mvn -f users/pom.xml docker:build @@ -53,19 +53,19 @@ else fi -docker-compose up -d kafka cli traefik +docker compose up -d kafka cli traefik echo "Waiting for the Kafka-Cluster to become ready..." -docker-compose exec cli cub kafka-ready -b kafka:9092 1 60 > /dev/null 2>&1 || exit 1 +docker compose exec cli cub kafka-ready -b kafka:9092 1 60 > /dev/null 2>&1 || exit 1 -docker-compose up -d users +docker compose up -d users while [ "$(http users.localhost/actuator/health 2> /dev/null | jq -r .status 2> /dev/null)" != "UP" ]; do echo "Waiting for service users..."; sleep 1; done http -v post users.localhost username=bart firstName=Bart lastName=Simpson sex=MALE http -v post users.localhost username=nerd firstName=Jane lastName=Doe sex=FEMALE http -v post users.localhost username=riddler firstName=Rumpel lastName=Stilzchen sex=MALE echo "Starting all instances..." -docker-compose up -d +docker compose up -d while [ "$(http query.localhost/actuator/health 2>/dev/null | jq -r .status 2> /dev/null)" != "UP" ]; do echo "Waiting for service query..."; sleep 1; done http -v query.localhost/bart @@ -84,7 +84,7 @@ http -v query.localhost/bart http -v query.localhost/nerd http -v query.localhost/riddler -// docker-compose up -d --scale query=5 query +// docker compose up -d --scale query=5 query http -v --follow query.localhost/bart sleep 1 http -v --follow query.localhost/bart diff --git a/docker-compose.yml b/docker-compose.yml index f057280..4f2a6c7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,3 @@ -version: '3.2' services: kafka: