2020-05-19 15:27:10 +00:00
|
|
|
version: '2.3'
|
2018-07-18 05:22:01 +00:00
|
|
|
|
|
|
|
services:
|
|
|
|
kafka_zookeeper:
|
2023-05-08 07:08:04 +00:00
|
|
|
image: zookeeper:3.4.9
|
|
|
|
hostname: kafka_zookeeper
|
2023-05-05 17:52:15 +00:00
|
|
|
ports:
|
|
|
|
- 2181:2181
|
2018-07-18 05:22:01 +00:00
|
|
|
environment:
|
2023-05-08 07:08:04 +00:00
|
|
|
ZOOKEEPER_CLIENT_PORT: 2181
|
|
|
|
security_opt:
|
|
|
|
- label:disable
|
|
|
|
|
2018-07-18 05:22:01 +00:00
|
|
|
kafka1:
|
2023-05-08 07:08:04 +00:00
|
|
|
image: confluentinc/cp-kafka:5.2.0
|
2018-07-18 05:22:01 +00:00
|
|
|
hostname: kafka1
|
|
|
|
ports:
|
2023-05-05 17:52:15 +00:00
|
|
|
- ${KAFKA_EXTERNAL_PORT}:${KAFKA_EXTERNAL_PORT}
|
2018-07-18 05:22:01 +00:00
|
|
|
environment:
|
2023-05-09 08:37:46 +00:00
|
|
|
KAFKA_ADVERTISED_LISTENERS: INSIDE://localhost:${KAFKA_EXTERNAL_PORT},OUTSIDE://kafka1:19092
|
2021-02-24 12:42:20 +00:00
|
|
|
KAFKA_ADVERTISED_HOST_NAME: kafka1
|
2023-05-09 08:37:46 +00:00
|
|
|
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT
|
|
|
|
KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE
|
|
|
|
KAFKA_BROKER_ID: 1
|
2023-05-05 17:52:15 +00:00
|
|
|
KAFKA_ZOOKEEPER_CONNECT: kafka_zookeeper:2181
|
2023-05-08 07:08:04 +00:00
|
|
|
KAFKA_LOG4J_LOGGERS: "kafka.controller=INFO,kafka.producer.async.DefaultEventHandler=INFO,state.change.logger=INFO"
|
2021-02-20 18:59:45 +00:00
|
|
|
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
|
2018-07-18 05:22:01 +00:00
|
|
|
depends_on:
|
2021-02-20 18:59:45 +00:00
|
|
|
- kafka_zookeeper
|
2023-05-08 07:08:04 +00:00
|
|
|
security_opt:
|
|
|
|
- label:disable
|
2023-05-02 12:31:00 +00:00
|
|
|
|
2020-02-03 00:02:19 +00:00
|
|
|
schema-registry:
|
|
|
|
image: confluentinc/cp-schema-registry:5.2.0
|
|
|
|
hostname: schema-registry
|
|
|
|
ports:
|
2023-05-05 17:52:15 +00:00
|
|
|
- ${SCHEMA_REGISTRY_EXTERNAL_PORT}:${SCHEMA_REGISTRY_EXTERNAL_PORT}
|
2020-02-03 00:02:19 +00:00
|
|
|
environment:
|
2021-02-20 18:59:45 +00:00
|
|
|
SCHEMA_REGISTRY_HOST_NAME: schema-registry
|
|
|
|
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: PLAINTEXT://kafka1:19092
|
2023-05-08 07:08:04 +00:00
|
|
|
SCHEMA_REGISTRY_LISTENERS: http://0.0.0.0:${SCHEMA_REGISTRY_EXTERNAL_PORT}
|
|
|
|
SCHEMA_REGISTRY_SCHEMA_REGISTRY_GROUP_ID: noauth
|
2023-05-02 12:31:00 +00:00
|
|
|
depends_on:
|
|
|
|
- kafka_zookeeper
|
|
|
|
- kafka1
|
2023-05-08 12:59:08 +00:00
|
|
|
restart: always
|
2023-05-08 07:08:04 +00:00
|
|
|
security_opt:
|
|
|
|
- label:disable
|
2023-05-02 12:31:00 +00:00
|
|
|
|
|
|
|
schema-registry-auth:
|
|
|
|
image: confluentinc/cp-schema-registry:5.2.0
|
|
|
|
hostname: schema-registry-auth
|
|
|
|
ports:
|
2023-05-05 17:52:15 +00:00
|
|
|
- ${SCHEMA_REGISTRY_AUTH_EXTERNAL_PORT}:${SCHEMA_REGISTRY_AUTH_EXTERNAL_PORT}
|
2023-05-02 12:31:00 +00:00
|
|
|
environment:
|
|
|
|
SCHEMA_REGISTRY_HOST_NAME: schema-registry-auth
|
2023-05-05 17:52:15 +00:00
|
|
|
SCHEMA_REGISTRY_LISTENERS: http://0.0.0.0:${SCHEMA_REGISTRY_AUTH_EXTERNAL_PORT}
|
2023-05-05 10:56:35 +00:00
|
|
|
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: PLAINTEXT://kafka1:19092
|
2023-04-29 21:23:55 +00:00
|
|
|
SCHEMA_REGISTRY_AUTHENTICATION_METHOD: BASIC
|
2023-05-05 17:52:15 +00:00
|
|
|
SCHEMA_REGISTRY_AUTHENTICATION_ROLES: user
|
2023-04-29 21:23:55 +00:00
|
|
|
SCHEMA_REGISTRY_AUTHENTICATION_REALM: RealmFooBar
|
|
|
|
SCHEMA_REGISTRY_OPTS: "-Djava.security.auth.login.config=/etc/schema-registry/secrets/schema_registry_jaas.conf"
|
2023-05-08 07:08:04 +00:00
|
|
|
SCHEMA_REGISTRY_SCHEMA_REGISTRY_GROUP_ID: auth
|
2023-04-29 21:23:55 +00:00
|
|
|
volumes:
|
|
|
|
- ${SCHEMA_REGISTRY_DIR:-}/secrets:/etc/schema-registry/secrets
|
2020-02-03 00:02:19 +00:00
|
|
|
depends_on:
|
2021-02-20 18:59:45 +00:00
|
|
|
- kafka_zookeeper
|
2023-05-05 10:56:35 +00:00
|
|
|
- kafka1
|
2023-05-08 12:59:08 +00:00
|
|
|
restart: always
|
2020-02-03 00:02:19 +00:00
|
|
|
security_opt:
|
2021-02-20 18:59:45 +00:00
|
|
|
- label:disable
|