Akash Sivakumar d4fc9382ed temp push
2024-11-20 16:30:09 -07:00

65 lines
1.5 KiB
YAML

version: '3.8'
services:
zookeeper:
image: confluentinc/cp-zookeeper:latest
networks:
- kafka_network
deploy:
replicas: 1
restart_policy:
condition: on-failure
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ports:
- "2181:2181"
healthcheck:
test: ["CMD", "nc", "-z", "localhost", "2181"]
interval: 10s
timeout: 5s
retries: 5
kafka:
image: confluentinc/cp-kafka:latest
depends_on:
- zookeeper
environment:
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT://localhost:9092
KAFKA_LISTENER_SECURITY_PROTOCOL: PLAINTEXT
KAFKA_BROKER_ID: 1
networks:
- kafka_network
ports:
- "9092:9092"
deploy:
replicas: 1
restart_policy:
condition: on-failure
healthcheck:
test: ["CMD", "nc", "-z", "localhost", "9092"]
interval: 10s
timeout: 5s
retries: 5
pcap_streamer:
image: levenshtein/streamer_test3:latest
depends_on:
- kafka
networks:
- kafka_network
volumes:
- "/host_mnt/c/Users/akash/storage/Asu/sem3/dds/project:/data/pcap"
environment:
PCAP_FILE: /data/pcap/202310081400.pcap
command: ["sh", "-c", "sleep 10 && python /app/pcap_processor.py -f /data/pcap/202310081400.pcap -s --stream_size 1000"]
deploy:
replicas: 1
restart_policy:
condition: on-failure
networks:
kafka_network:
driver: overlay