--- services: zookeeper: image: confluentinc/cp-zookeeper:7.4.0 platform: linux/amd64 env_file: zookeeper.env hostname: test_zookeeper container_name: test_zookeeper ports: - "52181" volumes: - test_zkdata:/var/lib/zookeeper/data - test_zklogs:/var/lib/zookeeper/log healthcheck: test: ["CMD-SHELL", "echo ruok | nc localhost 52181 || exit 1"] retries: 5 start_period: 15s restart: on-failure:3 deploy: resources: limits: memory: 512M reservations: memory: 256M broker: image: confluentinc/cp-kafka:7.4.0 platform: linux/amd64 env_file: broker.env hostname: test_broker container_name: test_broker depends_on: zookeeper: condition: service_healthy ports: - "29092:29092" healthcheck: test: - "CMD-SHELL" - "kafka-topics --bootstrap-server broker:9092 --list || exit 1" retries: 5 start_period: 30s restart: on-failure:3 deploy: resources: limits: memory: 512M reservations: memory: 256M schema-registry: image: confluentinc/cp-schema-registry:7.4.0 platform: linux/amd64 env_file: schema-registry.env container_name: test_schema_registry depends_on: zookeeper: condition: service_healthy broker: condition: service_healthy ports: - "28081:8081" healthcheck: test: ["CMD-SHELL", "curl -s -f http://localhost:8081/subjects || exit 1"] interval: 10s timeout: 5s retries: 5 start_period: 15s restart: on-failure:3 deploy: resources: limits: memory: 512M reservations: memory: 256M volumes: test_zkdata: test_zklogs: