Created
November 25, 2019 08:23
-
-
Save smedegaard/ff64edfa3929f9fe73c5be2bc419767b to your computer and use it in GitHub Desktop.
Docker sompose file for Udacity Streaming nanodegree
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# This docker-compose file starts and runs: | |
# * A 3-node kafka cluster | |
# * A 1-zookeeper ensemble | |
# * Schema Registry | |
# * Kafka REST Proxy | |
# * Kafka Connect | |
# | |
version: '3.7' | |
services: | |
zookeeper: | |
image: confluentinc/cp-zookeeper:5.2.2 | |
ports: | |
- "2181:2181" | |
environment: | |
ZOOKEEPER_CLIENT_PORT: "2181" | |
kafka0: | |
image: confluentinc/cp-kafka:5.2.2 | |
ports: | |
- "9092:9092" | |
environment: | |
KAFKA_BROKER_ID: 0 | |
KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181" | |
KAFKA_ADVERTISED_LISTENERS: "INTERNAL://kafka0:19092,EXTERNAL://${DOCKER_HOST_IP:-127.0.0.1}:9092" | |
KAFKA_INTER_BROKER_LISTENER_NAME: "INTERNAL" | |
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT" | |
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: "1" | |
depends_on: | |
- "zookeeper" | |
schema-registry: | |
image: confluentinc/cp-schema-registry:5.2.2 | |
ports: | |
- "8081:8081" | |
environment: | |
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: "PLAINTEXT://kafka0:19092" | |
SCHEMA_REGISTRY_LISTENERS: "http://0.0.0.0:8081" | |
SCHEMA_REGISTRY_HOST_NAME: "schema-registry" | |
SCHEMA_REGISTRY_KAFKASTORE_TOPIC_REPLICATION_FACTOR: "1" | |
depends_on: | |
- "kafka0" | |
rest-proxy: | |
image: confluentinc/cp-kafka-rest:5.2.2 | |
ports: | |
- "8082:8082" | |
environment: | |
KAFKA_REST_BOOTSTRAP_SERVERS: "PLAINTEXT://kafka0:19092" | |
KAFKA_REST_LISTENERS: "http://0.0.0.0:8082/" | |
KAFKA_REST_HOST_NAME: "rest-proxy" | |
KAFKA_REST_SCHEMA_REGISTRY_URL: "http://schema-registry:8081/" | |
depends_on: | |
- "kafka0" | |
- "schema-registry" | |
connect: | |
image: confluentinc/cp-kafka-connect:5.2.2 | |
ports: | |
- "8083:8083" | |
environment: | |
CONNECT_BOOTSTRAP_SERVERS: "PLAINTEXT://kafka0:19092" | |
CONNECT_GROUP_ID: "connect" | |
CONNECT_REST_ADVERTISED_HOST_NAME: "connect" | |
CONNECT_PLUGIN_PATH: "/usr/share/java" | |
CONNECT_INTERNAL_KEY_CONVERTER: "org.apache.kafka.connect.json.JsonConverter" | |
CONNECT_INTERNAL_VALUE_CONVERTER: "org.apache.kafka.connect.json.JsonConverter" | |
CONNECT_KEY_CONVERTER: "io.confluent.connect.avro.AvroConverter" | |
CONNECT_KEY_CONVERTER_SCHEMA_REGISTRY_URL: "http://schema-registry:8081" | |
CONNECT_VALUE_CONVERTER: "io.confluent.connect.avro.AvroConverter" | |
CONNECT_VALUE_CONVERTER_SCHEMA_REGISTRY_URL: "http://schema-registry:8081" | |
CONNECT_CONFIG_STORAGE_TOPIC: "connect-config" | |
CONNECT_OFFSET_STORAGE_TOPIC: "connect-offset" | |
CONNECT_STATUS_STORAGE_TOPIC: "connect-status" | |
CONNECT_CONFIG_STORAGE_REPLICATION_FACTOR: "1" | |
CONNECT_OFFSET_STORAGE_REPLICATION_FACTOR: "1" | |
CONNECT_STATUS_STORAGE_REPLICATION_FACTOR: "1" | |
depends_on: | |
- "kafka0" | |
- "schema-registry" | |
ksql: | |
image: confluentinc/cp-ksql-server:5.2.2 | |
ports: | |
- "8088:8088" | |
environment: | |
KSQL_BOOTSTRAP_SERVERS: "PLAINTEXT://kafka0:19092" | |
KSQL_LISTENERS: "http://0.0.0.0:8088" | |
KSQL_KSQL_SERVICE_ID: "ksql_service_docker" | |
KSQL_KSQL_SCHEMA_REGISTRY_URL: "http://schema-registry:8081/" | |
depends_on: | |
- "kafka0" | |
- "schema-registry" | |
connect-ui: | |
image: landoop/kafka-connect-ui:0.9.7 | |
ports: | |
- "8084:8084" | |
environment: | |
PORT: "8084" | |
PROXY: "true" | |
CONNECT_URL: "http://connect:8083" | |
depends_on: | |
- "connect" | |
topics-ui: | |
image: landoop/kafka-topics-ui:0.9.4 | |
ports: | |
- "8085:8085" | |
environment: | |
PORT: "8085" | |
PROXY: "true" | |
KAFKA_REST_PROXY_URL: "http://rest-proxy:8082" | |
depends_on: | |
- "rest-proxy" | |
schema-registry-ui: | |
image: landoop/schema-registry-ui:0.9.5 | |
ports: | |
- "8086:8086" | |
environment: | |
PORT: "8086" | |
PROXY: "true" | |
SCHEMAREGISTRY_URL: "http://schema-registry:8081/" | |
depends_on: | |
- "schema-registry" | |
postgres: | |
image: postgres:11 | |
ports: | |
- "5432:5432" | |
environment: | |
POSTGRES_USER: "cta_admin" | |
POSTGRES_PASSWORD: "chicago" | |
POSTGRES_DB: "cta" | |
volumes: | |
- ./producers/data/cta_stations.csv:/tmp/cta_stations.csv | |
- ./load_stations.sql:/docker-entrypoint-initdb.d/load_stations.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment