Skip to content

Commit

Permalink
Fix assembly, refactor docker-compose files
Browse files Browse the repository at this point in the history
  • Loading branch information
cipriansofronia committed Jun 20, 2021
1 parent 0e38d90 commit c70ad92
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ We need also to start the Envoy proxy to forward the browser's gRPC-Web requests
➜ docker run --rm -d --net host -v "$(pwd)"/build/envoy.yaml:/etc/envoy/envoy.yaml:ro envoyproxy/envoy:v1.15.0
```

### Build docker image
```bash
➜ sbt dockerize
```


### KAFKA TRADEMARK DISCLAIMER
Expand Down
5 changes: 3 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,9 @@ lazy val service = project
.dependsOn(common.jvm)
.settings(
assemblyMergeStrategy in assembly := {
case x if x.endsWith("io.netty.versions.properties") => MergeStrategy.concat
case "module-info.class" => MergeStrategy.discard
case x if x endsWith "io.netty.versions.properties" => MergeStrategy.concat
case x if x endsWith "module-info.class" => MergeStrategy.discard
case x if x endsWith ".proto" => MergeStrategy.discard
case x =>
val oldStrategy = (assemblyMergeStrategy in assembly).value
oldStrategy(x)
Expand Down
8 changes: 8 additions & 0 deletions docker-compose/compose-kafkamate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"clusters" : [{
"id" : "local-docker-compose-P97bAp",
"name" : "local-docker-compose",
"kafkaHosts" : ["kafka:29092"],
"schemaRegistryUrl" : "http://schema-registry:8081"
}]
}
File renamed without changes.
43 changes: 43 additions & 0 deletions docker-compose/kafkamate-kafka-schema-registry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
version: "2"

services:
kafkamate:
image: csofronia/kafkamate:latest
hostname: kafkamate
ports:
- "8080:8080"
- "61234:61234"
- "61235:61235"
volumes:
- ${PWD}/compose-kafkamate.json:/kafkamate.json
depends_on:
- kafka
- schema-registry

schema-registry:
image: confluentinc/cp-schema-registry:5.5.1
hostname: schema-registry
ports:
- "8081:8081"
environment:
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: PLAINTEXT://kafka:29092
SCHEMA_REGISTRY_HOST_NAME: schema-registry
SCHEMA_REGISTRY_LISTENERS: http://0.0.0.0:8081
depends_on:
- kafka

kafka:
image: obsidiandynamics/kafka
restart: "no"
ports:
- "2181:2181"
- "9092:9092"
environment:
KAFKA_LISTENERS: "INTERNAL://:29092,EXTERNAL://:9092"
KAFKA_ADVERTISED_LISTENERS: "INTERNAL://kafka:29092,EXTERNAL://localhost:9092"
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT"
KAFKA_INTER_BROKER_LISTENER_NAME: "INTERNAL"
KAFKA_ZOOKEEPER_SESSION_TIMEOUT: "6000"
KAFKA_RESTART_ATTEMPTS: "10"
KAFKA_RESTART_DELAY: "5"
ZOOKEEPER_AUTOPURGE_PURGE_INTERVAL: "0"

0 comments on commit c70ad92

Please sign in to comment.