|
1 | | -version: '3.6' |
| 1 | +version: '3.8' |
2 | 2 | services: |
3 | | - zookeeper: |
4 | | - image: confluentinc/cp-zookeeper:7.3.3 |
5 | | - hostname: zookeeper |
6 | | - container_name: zookeeper |
7 | | - ports: |
8 | | - - '2181:2181' |
9 | | - environment: |
10 | | - ZOOKEEPER_CLIENT_PORT: 2181 |
11 | | - healthcheck: |
12 | | - test: ['CMD-SHELL', 'nc -zv localhost 2181 && exit 0 || exit 1'] |
13 | | - |
14 | 3 | broker: |
15 | | - image: confluentinc/cp-enterprise-kafka:7.3.3 |
| 4 | + image: confluentinc/cp-server:7.8.0 |
16 | 5 | hostname: broker |
17 | 6 | container_name: broker |
18 | | - depends_on: |
19 | | - - zookeeper |
20 | 7 | ports: |
21 | 8 | - '9092:9092' |
22 | 9 | - '29092:29092' |
23 | 10 | healthcheck: |
24 | | - test: ['CMD-SHELL', 'nc -zv localhost 9092 && exit 0 || exit 1'] |
| 11 | + test: ["CMD-SHELL", "nc -z localhost 9092"] |
| 12 | + interval: 10s |
| 13 | + timeout: 5s |
| 14 | + retries: 5 |
25 | 15 | environment: |
26 | | - KAFKA_BROKER_ID: 1 |
27 | | - KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181' |
28 | | - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT |
| 16 | + KAFKA_NODE_ID: 1 |
| 17 | + CLUSTER_ID: 'MkU3OEVBNTcwNTJENDM2Qk' |
| 18 | + KAFKA_PROCESS_ROLES: 'broker,controller' |
| 19 | + KAFKA_CONTROLLER_QUORUM_VOTERS: '1@broker:9093' |
| 20 | + KAFKA_LISTENERS: 'PLAINTEXT://broker:29092,CONTROLLER://broker:9093,PLAINTEXT_HOST://0.0.0.0:9092' |
29 | 21 | KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://broker:29092,PLAINTEXT_HOST://localhost:9092 |
| 22 | + KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: 'CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT' |
| 23 | + KAFKA_CONTROLLER_LISTENER_NAMES: 'CONTROLLER' |
30 | 24 | KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 |
31 | 25 | KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0 |
32 | 26 |
|
33 | 27 | schema-registry: |
34 | | - image: confluentinc/cp-schema-registry:7.3.3 |
| 28 | + image: confluentinc/cp-schema-registry:7.8.0 |
35 | 29 | hostname: schema-registry |
36 | 30 | container_name: schema-registry |
37 | 31 | depends_on: |
38 | | - - zookeeper |
39 | | - - broker |
| 32 | + broker: |
| 33 | + condition: service_healthy |
40 | 34 | ports: |
41 | 35 | - '8081:8081' |
42 | 36 | healthcheck: |
43 | | - test: ['CMD-SHELL', 'nc -zv localhost 8081 && exit 0 || exit 1'] |
| 37 | + test: ["CMD-SHELL", "nc -z localhost 8081"] |
| 38 | + interval: 10s |
| 39 | + timeout: 5s |
| 40 | + retries: 5 |
44 | 41 | environment: |
45 | 42 | SCHEMA_REGISTRY_HOST_NAME: schema-registry |
46 | 43 | SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: 'broker:29092' |
47 | 44 | SCHEMA_REGISTRY_LISTENERS: 'http://0.0.0.0:8081' |
48 | | - SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL: 'zookeeper:2181' |
49 | 45 |
|
50 | 46 | rest-proxy: |
51 | | - image: confluentinc/cp-kafka-rest:7.3.3 |
| 47 | + image: confluentinc/cp-kafka-rest:7.8.0 |
52 | 48 | depends_on: |
53 | | - - zookeeper |
54 | | - - broker |
55 | | - - schema-registry |
| 49 | + broker: |
| 50 | + condition: service_healthy |
| 51 | + schema-registry: |
| 52 | + condition: service_healthy |
56 | 53 | ports: |
57 | 54 | - 8082:8082 |
58 | 55 | healthcheck: |
59 | | - test: ['CMD-SHELL', 'nc -zv localhost 8082 && exit 0 || exit 1'] |
| 56 | + test: ["CMD-SHELL", "nc -z localhost 8082"] |
| 57 | + interval: 10s |
| 58 | + timeout: 5s |
| 59 | + retries: 5 |
60 | 60 | hostname: rest-proxy |
61 | 61 | container_name: rest-proxy |
62 | 62 | environment: |
|
0 commit comments