3 IMAGE=juplo/simple-producer:1.0-SNAPSHOT
5 if [ "$1" = "cleanup" ]
7 docker-compose -f docker/docker-compose.yml down -v
12 docker-compose -f docker/docker-compose.yml up -d kafka-1 kafka-2 kafka-3 cli
13 docker-compose -f docker/docker-compose.yml rm -svf producer
16 $(docker image ls -q $IMAGE) == "" ||
20 mvn clean install || exit
22 echo "Using image existing images:"
23 docker image ls $IMAGE
26 docker-compose -f docker/docker-compose.yml up setup
27 docker-compose -f docker/docker-compose.yml ps
28 docker-compose -f docker/docker-compose.yml up -d producer
31 docker-compose -f docker/docker-compose.yml exec cli kafkacat -b kafka:9092 -t test -c 20 -f'topic=%t\tpartition=%p\toffset=%o\tkey=%k\tvalue=%s\n'
33 docker-compose -f docker/docker-compose.yml stop producer
34 docker-compose -f docker/docker-compose.yml exec cli kafkacat -b kafka:9092 -t test -e -f'topic=%t\tpartition=%p\toffset=%o\tkey=%k\tvalue=%s\n'
35 docker-compose -f docker/docker-compose.yml logs producer