X-Git-Url: https://juplo.de/gitweb/?a=blobdiff_plain;f=docker-compose.yml;h=d855918add81873ff0a835d6007ce27c7b0ac321;hb=53c63296c53bfe30bd50eb52a6e455beb6792015;hp=81b98ac3167e600dcda8f6d3886511fa3d620285;hpb=d6285c99580cf17465182b68c68ae9a3674ae7a7;p=demos%2Fkafka%2Ftraining diff --git a/docker-compose.yml b/docker-compose.yml index 81b98ac..d855918 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,6 +24,25 @@ services: depends_on: - zookeeper + mongo: + image: mongo:4.4.13 + ports: + - 27017:27017 + environment: + MONGO_INITDB_ROOT_USERNAME: juplo + MONGO_INITDB_ROOT_PASSWORD: training + + express: + image: mongo-express + ports: + - 8090:8081 + environment: + ME_CONFIG_MONGODB_ADMINUSERNAME: juplo + ME_CONFIG_MONGODB_ADMINPASSWORD: training + ME_CONFIG_MONGODB_URL: mongodb://juplo:training@mongo:27017/ + depends_on: + - mongo + setup: image: juplo/toolbox command: > @@ -36,8 +55,78 @@ services: image: juplo/toolbox command: sleep infinity + bart: + image: juplo/wordcount--fortune:1.0.0 + command: bash -c " + while [ true ]; + do + /usr/games/fortune chalkboard + | head -1 + | http -v producer:8080/bart; + echo; + sleep 1; + done" + + nerd: + image: juplo/wordcount--fortune:1.0.0 + command: bash -c " + while [ true ]; + do + /usr/games/fortune computers + | grep -v '^[[:space:]]*--' + | http -v producer:8080/nerd; + echo; + sleep 1; + done" + + riddler: + image: juplo/wordcount--fortune:1.0.0 + command: bash -c " + while [ true ]; + do + /usr/games/fortune riddles + | awk -F':' '/^Q/ { print $$2 }' + | http -v producer:8080/riddler; + echo; + sleep 1; + sleep 1; + done" + + kraut: + image: juplo/wordcount--fortune:1.0.0 + command: bash -c " + while [ true ]; + do + /usr/games/fortune de + | http -v producer:8080/kraut; + echo; + sleep 1; + done" + + poet: + image: juplo/wordcount--fortune:1.0.0 + command: bash -c " + while [ true ]; + do + /usr/games/fortune songs-poems + | http -v producer:8080/poet; + echo; + sleep 1; + done" + + linux: + image: juplo/wordcount--fortune:1.0.0 + command: bash -c " + while [ true ]; + do + /usr/games/fortune linux + | http -v producer:8080/linux; + echo; + sleep 1; + done" + producer: - image: juplo/endless-long-producer:1.0-SNAPSHOT + image: juplo/rest-producer:1.0-SNAPSHOT ports: - 8080:8080 environment: @@ -45,16 +134,27 @@ services: producer.bootstrap-server: kafka:9092 producer.client-id: producer producer.topic: test - producer.throttle-ms: 200 - - consumer: - image: juplo/endless-consumer:1.0-SNAPSHOT + consumer-1: + image: juplo/wordcount:1.0-SNAPSHOT ports: - 8081:8080 environment: server.port: 8080 consumer.bootstrap-server: kafka:9092 - consumer.client-id: my-group - consumer.client-id: consumer + consumer.client-id: consumer-1 + consumer.topic: test + spring.data.mongodb.uri: mongodb://juplo:training@mongo:27017 + spring.data.mongodb.database: juplo + + consumer-2: + image: juplo/wordcount:1.0-SNAPSHOT + ports: + - 8082:8080 + environment: + server.port: 8080 + consumer.bootstrap-server: kafka:9092 + consumer.client-id: consumer-2 consumer.topic: test + spring.data.mongodb.uri: mongodb://juplo:training@mongo:27017 + spring.data.mongodb.database: juplo