-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
40 lines (40 loc) · 1.01 KB
/
docker-compose.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
version: '2'
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'
restart: always
networks:
test-network:
driver: 'bridge'