Update ingestor and data manager for improved shutdown handling and logging - Incremented project version in quality gate configuration. - Commented out ingestor service in docker-compose for clarity. - Enhanced main loop in app.py to handle exit signals and exceptions. - Added shutdown methods in Ingestor and DataManager classes for graceful resource cleanup. - Updated unit tests to validate shutdown behavior and exception handling. - Introduced coverage configuration to omit specific files.
103 lines
2.0 KiB
YAML
103 lines
2.0 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
# ingestor:
|
|
# build:
|
|
# context: .
|
|
# environment:
|
|
# HOSTNAME: ingestor
|
|
# container_name: ingestor
|
|
# depends_on:
|
|
# - kafka
|
|
# - redis
|
|
# networks:
|
|
# - kafka-net
|
|
# env_file:
|
|
# - .env
|
|
|
|
zookeeper:
|
|
image: confluentinc/cp-zookeeper:latest
|
|
container_name: zookeeper
|
|
environment:
|
|
ZOOKEEPER_CLIENT_PORT: 2181
|
|
ZOOKEEPER_TICK_TIME: 2000
|
|
networks:
|
|
- kafka-net
|
|
env_file:
|
|
- .env
|
|
|
|
kafka:
|
|
image: confluentinc/cp-kafka:latest
|
|
container_name: kafka
|
|
ports:
|
|
- "9092:9092"
|
|
environment:
|
|
KAFKA_BROKER_ID: 1
|
|
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
|
|
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092,
|
|
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
|
|
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
|
|
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
|
|
depends_on:
|
|
- zookeeper
|
|
networks:
|
|
- kafka-net
|
|
env_file:
|
|
- .env
|
|
|
|
redis:
|
|
image: redis:latest
|
|
container_name: redis
|
|
ports:
|
|
- "6379:6379"
|
|
networks:
|
|
- kafka-net
|
|
env_file:
|
|
- .env
|
|
|
|
redis-commander:
|
|
image: rediscommander/redis-commander:latest
|
|
container_name: redis-commander
|
|
environment:
|
|
REDIS_HOSTS: local:redis:6379
|
|
ports:
|
|
- "8081:8081"
|
|
depends_on:
|
|
- redis
|
|
networks:
|
|
- kafka-net
|
|
|
|
|
|
kafdrop:
|
|
image: obsidiandynamics/kafdrop:latest
|
|
networks:
|
|
- kafka-net
|
|
depends_on:
|
|
- kafka
|
|
ports:
|
|
- 19000:9000
|
|
environment:
|
|
KAFKA_BROKERCONNECT: kafka:29092
|
|
|
|
simulator:
|
|
build:
|
|
context: .
|
|
dockerfile: simulator/Dockerfile
|
|
args:
|
|
GIT_REPO: ${SIMULATOR_GIT_REPO}
|
|
GIT_BRANCH: ${SIMULATOR_GIT_BRANCH}
|
|
container_name: simulator
|
|
ports:
|
|
- "4840:4840"
|
|
depends_on:
|
|
- kafka
|
|
- redis
|
|
networks:
|
|
- kafka-net
|
|
env_file:
|
|
- .env
|
|
|
|
networks:
|
|
kafka-net:
|
|
driver: bridge
|