2021-08-11 15:47:18 -07:00
|
|
|
---
|
|
|
|
services:
|
|
|
|
zookeeper:
|
2025-04-22 12:58:47 +02:00
|
|
|
image: confluentinc/cp-zookeeper:7.4.0
|
|
|
|
platform: linux/amd64
|
2021-08-11 15:47:18 -07:00
|
|
|
env_file: zookeeper.env
|
|
|
|
hostname: test_zookeeper
|
2023-05-26 04:10:56 +05:30
|
|
|
container_name: test_zookeeper
|
2021-08-11 15:47:18 -07:00
|
|
|
ports:
|
2023-04-04 18:38:30 +05:30
|
|
|
- "52181"
|
2021-08-11 15:47:18 -07:00
|
|
|
volumes:
|
2024-01-03 14:28:22 -05:00
|
|
|
- test_zkdata:/var/lib/zookeeper/data
|
|
|
|
- test_zklogs:/var/lib/zookeeper/log
|
2025-04-22 12:58:47 +02:00
|
|
|
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
|
2021-08-11 15:47:18 -07:00
|
|
|
|
|
|
|
broker:
|
2025-04-22 12:58:47 +02:00
|
|
|
image: confluentinc/cp-kafka:7.4.0
|
|
|
|
platform: linux/amd64
|
2021-08-11 15:47:18 -07:00
|
|
|
env_file: broker.env
|
|
|
|
hostname: test_broker
|
|
|
|
container_name: test_broker
|
|
|
|
depends_on:
|
2025-04-22 12:58:47 +02:00
|
|
|
zookeeper:
|
|
|
|
condition: service_healthy
|
2021-08-11 15:47:18 -07:00
|
|
|
ports:
|
2023-04-04 18:38:30 +05:30
|
|
|
- "29092:29092"
|
2025-04-22 12:58:47 +02:00
|
|
|
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
|
2021-08-11 15:47:18 -07:00
|
|
|
|
|
|
|
schema-registry:
|
2025-04-22 12:58:47 +02:00
|
|
|
image: confluentinc/cp-schema-registry:7.4.0
|
|
|
|
platform: linux/amd64
|
2021-08-11 15:47:18 -07:00
|
|
|
env_file: schema-registry.env
|
2021-10-12 18:50:39 -07:00
|
|
|
container_name: test_schema_registry
|
2021-08-11 15:47:18 -07:00
|
|
|
depends_on:
|
2025-04-22 12:58:47 +02:00
|
|
|
zookeeper:
|
|
|
|
condition: service_healthy
|
|
|
|
broker:
|
|
|
|
condition: service_healthy
|
2021-08-11 15:47:18 -07:00
|
|
|
ports:
|
2023-04-04 18:38:30 +05:30
|
|
|
- "28081:8081"
|
2025-04-22 12:58:47 +02:00
|
|
|
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
|
2021-08-11 15:47:18 -07:00
|
|
|
|
|
|
|
volumes:
|
2022-10-13 19:49:50 +00:00
|
|
|
test_zkdata:
|
2024-01-03 14:28:22 -05:00
|
|
|
test_zklogs:
|