Skip to content

Commit

Permalink
Add initial Docker Compose file to ease setup and iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanmei committed Aug 2, 2019
1 parent a5bcf0b commit 0a46ee5
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 1 deletion.
76 changes: 76 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
version: "3"

services:
zookeeper:
image: confluentinc/cp-zookeeper:5.2.2
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ports:
- 2181:2181
logging: { driver: none }

broker:
image: confluentinc/cp-kafka:5.2.2
ports:
- 9092:9092
environment:
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
- KAFKA_LISTENERS=PUBLIC://0.0.0.0:9092,INTERNAL://0.0.0.0:19092
- KAFKA_ADVERTISED_LISTENERS=PUBLIC://localhost:9092,INTERNAL://broker:19092
- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=PUBLIC:PLAINTEXT,INTERNAL:PLAINTEXT
- KAFKA_INTER_BROKER_LISTENER_NAME=INTERNAL
- KAFKA_NUM_PARTITIONS=2
- KAFKA_DEFAULT_REPLICATION_FACTOR=1
- KAFKA_OFFSETS_TOPIC_NUM_PARTITIONS=10
- KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1
- KAFKA_DELETE_TOPIC_ENABLE=true
- KAFKA_CONFLUENT_SUPPORT_METRICS_ENABLE=false

- KAFKA_LOG4J_ROOT_LOGLEVEL=INFO
depends_on: [zookeeper]
logging: { driver: none }

schema-registry:
image: confluentinc/cp-schema-registry:5.2.2
hostname: schema-registry
ports:
- 8080:8080
environment:
- SCHEMA_REGISTRY_HOST_NAME=schema-registry
- SCHEMA_REGISTRY_LISTENERS=http://0.0.0.0:8080

- SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS=PLAINTEXT://broker:19092
- SCHEMA_REGISTRY_KAFKASTORE_TOPIC=_schemas
- SCHEMA_REGISTRY_KAFKASTORE_TOPIC_REPLICATION_FACTOR=1
- SCHEMA_REGISTRY_KAFKASTORE_TIMEOUT_MS=15000
depends_on: [broker]
logging: { driver: none }

connect:
image: confluentinc/cp-kafka-connect:5.2.2
ports:
- 8083:8083
environment:
- CONNECT_BOOTSTRAP_SERVERS=broker:19092
- CONNECT_REST_ADVERTISED_HOST_NAME=connect
- CONNECT_GROUP_ID=connect
- CONNECT_CONFIG_STORAGE_TOPIC=_connect_configs
- CONNECT_CONFIG_STORAGE_REPLICATION_FACTOR=1
- CONNECT_OFFSET_STORAGE_TOPIC=_connect_offsets
- CONNECT_OFFSET_STORAGE_REPLICATION_FACTOR=1
- CONNECT_STATUS_STORAGE_TOPIC=_connect_status
- CONNECT_STATUS_STORAGE_REPLICATION_FACTOR=1
- CONNECT_KEY_CONVERTER=org.apache.kafka.connect.json.JsonConverter
- CONNECT_VALUE_CONVERTER=org.apache.kafka.connect.json.JsonConverter
- CONNECT_INTERNAL_KEY_CONVERTER=org.apache.kafka.connect.json.JsonConverter
- CONNECT_INTERNAL_VALUE_CONVERTER=org.apache.kafka.connect.json.JsonConverter

- CONNECT_PLUGIN_PATH=/opt/connectors

- AWS_PROFILE
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
volumes:
- ~/.aws:/root/.aws
- ./target:/opt/connectors
depends_on: [broker]
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
<goal>shade</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/.shaded-jar</outputDirectory>
<filters>
<filter>
<artifact>*:*</artifact>
Expand Down Expand Up @@ -233,4 +234,4 @@
</organization>


</project>
</project>

0 comments on commit 0a46ee5

Please sign in to comment.