#!/bin/bash
RECORDER=juplo/wordcount--recorder:1.0.0
+USERS=juplo/wordcount--users:1.0.0
COUNTER=juplo/wordcount--counter:1.0.0
TOP10=juplo/wordcount--top10:1.0.0
-QUERY=juplo/wordcount--query:1.0.0
+QUERY=juplo/wordcount--query:1.0.2
if [ "$1" = "cleanup" ]
then
docker-compose down -v
docker image rm $RECORDER
+ docker image rm $USERS
docker image rm $COUNTER
docker image rm $TOP10
docker image rm $QUERY
if [[
$(docker image ls -q $RECORDER) == "" ||
+ $(docker image ls -q $USERS) == "" ||
$(docker image ls -q $COUNTER) == "" ||
$(docker image ls -q $TOP10) == "" ||
$(docker image ls -q $QUERY) == "" ||
then
git submodule update --init
mvn clean package || exit
- docker-compose rm -svf recorder counter top10 query
+ docker-compose rm -svf recorder users counter top10 query
mvn -f recorder/pom.xml docker:build
+ mvn -f users/pom.xml docker:build
mvn -f counter/pom.xml docker:build
mvn -f top10/pom.xml docker:build
mvn -f query/pom.xml docker:build
else
echo "Using existing images:"
docker image ls $RECORDER
+ docker image ls $USERS
docker image ls $COUNTER
docker image ls $TOP10
docker image ls $QUERY
depends_on:
- kafka
+ users:
+ image: juplo/wordcount--users:1.0.0
+ environment:
+ juplo.wordcount.users.bootstrap-server: kafka:9092
+ juplo.wordcount.users.topic: users
+ ports:
+ - 8082:8080
+ depends_on:
+ - kafka
+
counter:
image: juplo/wordcount--counter:1.0.0
environment:
- kafka
query:
- image: juplo/wordcount--query:1.0.0
+ image: juplo/wordcount--query:1.0.2
environment:
juplo.wordcount.query.bootstrap-server: kafka:9092
juplo.wordcount.query.application-id: query
juplo.wordcount.query.ranking-input-topic: top10
+ juplo.wordcount.query.users-input-topic: users
ports:
- 8085:8080
depends_on: