-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
113 lines (104 loc) · 3.08 KB
/
docker-compose.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
version: '3.4'
services:
zookeeper:
image: confluentinc/cp-zookeeper:4.1.0
restart: always
container_name: demo-zookeeper
expose:
- 2181
environment:
ZOOKEEPER_CLIENT_PORT: "2181"
ZOOKEEPER_TICK_TIME: "2000"
kafka:
image: confluentinc/cp-kafka:4.1.0
container_name: demo-kafka
ports:
- 29092:29092
- 9093
depends_on:
- zookeeper
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: demo-zookeeper:2181
KAFKA_LISTENERS: EXTERNAL://:29092,INTERNAL://:9093
KAFKA_ADVERTISED_LISTENERS: EXTERNAL://localhost:29092,INTERNAL://demo-kafka:9093
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: EXTERNAL:PLAINTEXT,INTERNAL:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.3.1
container_name: demo-elasticsearch
environment:
- cluster.name=demo-elasticsearch
- action.auto_create_index=false
- bootstrap.memory_lock=true
- discovery.type=single-node
- xpack.security.enabled=false
- xpack.monitoring.enabled=false
- xpack.ml.enabled=false
- xpack.graph.enabled=false
- xpack.watcher.enabled=false
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
cap_add:
- IPC_LOCK
expose:
- 9200
monogdb:
image: bitnami/mongodb:latest
container_name: demo-mongodb
expose:
- 27017
mysql:
image: percona:5.7.21
container_name: demo-mysql
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
expose:
- 3306
redis:
image: redis:5.0.7
container_name: demo-redis
expose:
- 6379
whalewatcher:
image: initialcontext/whalewatcher:latest
container_name: demo-whalewatcher
ports:
- 5555:4444
command: ["/bin/whalewatcher", "--config-var", "MONITOR_CONFIG"]
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
MONITOR_CONFIG: |
containers:
demo-elasticsearch:
pattern: 'recovered \[\d+\] indices into cluster_state'
demo-redis:
since: "24h"
pattern: 'Ready to accept connections'
max_wait_millis: 20000
demo-mysql:
patterns:
- 'mysqld: ready for connections'
- 'pattern that only matches on cold init'
- 'pattern that only matches on restart'
demo-mongodb:
pattern: 'waiting for connections on port \d+'
demo-kafka:
pattern: 'Cached leader info PartitionState'
demo-zookeeper:
pattern: 'Established session 0x[a-f0-9]+'
max_wait_millis: 20000
internal_demo_watcher:
image: alpine:latest
container_name: demo-app-depends-on-some-services
depends_on:
- whalewatcher
command: ['/bin/sh', '-c', "apk update && apk add curl jq && watch -n 3 'curl -sS http://demo-whalewatcher:4444/ | jq .'"]