Merge der überarbeiteten Compose-Konfiguration ('rest-producer')
authorKai Moritz <kai@juplo.de>
Sat, 23 Jul 2022 10:31:39 +0000 (12:31 +0200)
committerKai Moritz <kai@juplo.de>
Sat, 23 Jul 2022 10:31:39 +0000 (12:31 +0200)
1  2 
docker-compose.yml

diff --combined docker-compose.yml
@@@ -24,78 -24,34 +24,86 @@@ services
      depends_on:
        - zookeeper
  
 -  setup:
 -    image: juplo/toolbox
 -    command: >
 -      bash -c "
 -        kafka-topics --bootstrap-server kafka:9092 --delete --if-exists --topic test
 -        kafka-topics --bootstrap-server kafka:9092 --create --topic test --partitions 2
 -      "
 +  kafka-ui:
 +    image: provectuslabs/kafka-ui:0.3.3
 +    ports:
 +      - 8080:8080
 +    environment:
 +      KAFKA_CLUSTERS_0_NAME: local
 +      KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:9092
  
    cli:
      image: juplo/toolbox
      command: sleep infinity
  
 -  producer:
 +  producer-0:
      image: juplo/rest-producer:1.0-SNAPSHOT
      ports:
 -      - 8080:8080
 +      - 8000:8080
 +    environment:
++      server.port: 8080
 +      producer.bootstrap-server: kafka:9092
 +      producer.client-id: producer
 +      producer.topic: test
 +      producer.partition: 0
 +
 +  producer-1:
 +    image: juplo/rest-producer:1.0-SNAPSHOT
 +    ports:
 +      - 8001:8080
      environment:
+       server.port: 8080
        producer.bootstrap-server: kafka:9092
        producer.client-id: producer
        producer.topic: test
 +      producer.partition: 1
 +
 +  peter:
 +    image: juplo/rest-client:1.0-SNAPSHOT
 +    environment:
++      server.port: 8080
 +      rest-client.baseUrl: http://producer-1:8080
 +      rest-client.username: peter
 +      rest-client.throttle-ms: 1000
 +
 +  klaus:
 +    image: juplo/rest-client:1.0-SNAPSHOT
 +    environment:
++      server.port: 8080
 +      rest-client.baseUrl: http://producer-1:8080
 +      rest-client.username: klaus
 +      rest-client.throttle-ms: 1100
 +
 +  beate:
 +    image: juplo/rest-client:1.0-SNAPSHOT
 +    environment:
++      server.port: 8080
 +      rest-client.baseUrl: http://producer-0:8080
 +      rest-client.username: beate
 +      rest-client.throttle-ms: 900
 +
 +  franz:
 +    image: juplo/rest-client:1.0-SNAPSHOT
 +    environment:
++      server.port: 8080
 +      rest-client.baseUrl: http://producer-1:8080
 +      rest-client.username: franz
 +      rest-client.throttle-ms: 800
 +
 +  uschi:
 +    image: juplo/rest-client:1.0-SNAPSHOT
 +    environment:
++      server.port: 8080
 +      rest-client.baseUrl: http://producer-0:8080
 +      rest-client.username: uschi
 +      rest-client.throttle-ms: 1200
  
    consumer:
      image: juplo/endless-consumer:1.0-SNAPSHOT
      ports:
-       - 8081:8081
+       - 8081:8080
      environment:
+       server.port: 8080
        consumer.bootstrap-server: kafka:9092
        consumer.client-id: my-group
        consumer.client-id: consumer