-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-with-testreceiver.yaml
57 lines (57 loc) · 1.55 KB
/
docker-compose-with-testreceiver.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
version: '3.7'
services:
test-zookeeper:
image: wurstmeister/zookeeper
container_name: 'test-zookeeper'
ports:
- '2181:2181'
networks:
- 'test-network'
test-kafka:
image: wurstmeister/kafka
container_name: 'test-kafka'
ports:
- '9092:9092'
environment:
KAFKA_ADVERTISED_HOST_NAME: 'test-kafka'
KAFKA_ADVERTISED_PORT: 9092
KAFKA_ZOOKEEPER_CONNECT: 'test-zookeeper:2181'
volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
networks:
- 'test-network'
message_generator:
build: .
container_name: 'message_generator'
depends_on:
- 'test-kafka'
networks:
- 'test-network'
environment:
KAFKA_BOOTSTRAP_SERVERS: 'test-kafka:9092'
KAFKA_TOPIC_OUTPUT: 'test-message-generator'
MESSAGE_SEND_INTERVAL: 5
LOG_LEVEL: 'INFO'
LOG_FORMAT: '%(asctime)-15s %(message)s'
LOG_FILE_PATH: '/var/log/test_message_generator.log'
entrypoint: 'python3 message_generator/__main__.py'
restart: always
test-receiver:
build: .
container_name: 'test-receiver'
depends_on:
- 'test-kafka'
networks:
- 'test-network'
environment:
KAFKA_BOOTSTRAP_SERVERS: 'test-kafka:9092'
KAFKA_TOPIC_OUTPUT: 'test-message-generator'
MESSAGE_SEND_INTERVAL: 5
LOG_LEVEL: 'INFO'
LOG_FORMAT: '%(asctime)-15s %(message)s'
LOG_FILE_PATH: '/var/log/test_message_generator.log'
entrypoint: 'python3 message_generator/test_receiver.py'
restart: always
networks:
test-network:
driver: 'bridge'