-
Notifications
You must be signed in to change notification settings - Fork 1
/
local.yml
83 lines (77 loc) · 1.92 KB
/
local.yml
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
version: '3'
volumes:
local_postgres_data: {}
local_postgres_data_backups: {}
services:
monitoring:
build:
context: .
dockerfile: ./compose/local/Dockerfile.monitoring
image: dev-monitoring_producer
container_name: dev-monitoring_producer
links:
- kafka
volumes:
- .:/app:z
command: /monitoring
consumer:
build:
context: .
dockerfile: ./compose/local/Dockerfile.consumer
image: dev-monitoring-consumer
container_name: dev-monitoring-consumer
links:
- kafka
- postgres
volumes:
- .:/app:z
command: /consumer
environment:
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
POSTGRES_DB: monitoring
POSTGRES_USER: demo
POSTGRES_PASSWORD: demopassword
zookeeper:
image: wurstmeister/zookeeper
ports:
- "2181:2181"
environment:
KAFKA_HEAP_OPTS: "-Xmx256m -Xms256m"
logging:
driver: "json-file"
options:
max-size: "500k"
max-file: "7"
kafka:
image: wurstmeister/kafka
ports:
- "9092:9092"
expose:
- "9093"
environment:
KAFKA_ADVERTISED_LISTENERS: INSIDE://kafka:9093,OUTSIDE://localhost:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT
KAFKA_LISTENERS: INSIDE://0.0.0.0:9093,OUTSIDE://0.0.0.0:9092
KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
volumes:
- /var/run/docker.sock:/var/run/docker.sock
links:
- zookeeper
logging:
driver: "json-file"
options:
max-size: "500k"
max-file: "7"
postgres:
image: postgres:12.3
container_name: postgres_monitoring
volumes:
- local_postgres_data:/var/lib/postgresql/data:Z
environment:
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
POSTGRES_DB: monitoring
POSTGRES_USER: demo
POSTGRES_PASSWORD: demopassword