-
Notifications
You must be signed in to change notification settings - Fork 24
/
docker-compose.yml
91 lines (91 loc) · 2.46 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
version: "3.8"
services:
logstash:
image: docker.elastic.co/logstash/logstash:8.8.1
restart: unless-stopped
volumes:
- logstash-data:/usr/share/logstash/data
- ./.docker/logstash.conf:/usr/share/logstash/pipeline/logstash.conf:ro
- ./.docker/logstash.yml:/usr/share/logstash/config/logstash.yml:ro
depends_on:
- elasticsearch
healthcheck:
test:
- "CMD"
- "bash"
- "-c"
- 'curl -Ss localhost:9600 | grep -o ''"status":"[a-z]*"'' | awk -F'':'' ''{print $2}'' | grep -q "green" || exit 1'
interval: 30s
timeout: 10s
retries: 8
command: /usr/local/bin/docker-entrypoint --config.reload.automatic
ports:
- ${LOGSTASH_PORT:-5044}:5044
- ${LOGSTASH_STATS_PORT:-9600}:9600
prometheus:
image: prom/prometheus:v2.44.0
restart: unless-stopped
volumes:
- prometheus-data:/prometheus
- ./.docker/prometheus.yaml:/etc/prometheus/prometheus.yml:ro
environment:
- PROMETHEUS_PORT=${PROMETHEUS_PORT:-9090}
ports:
- ${PROMETHEUS_PORT:-9090}:9090
healthcheck:
test:
- "CMD"
- "sh"
- "-c"
- "wget --no-verbose --tries=1 --spider http://localhost:9090 || exit 1"
interval: 30s
timeout: 10s
retries: 8
elasticsearch:
image: elasticsearch:8.8.0
restart: unless-stopped
volumes:
- elasticsearch-data:/usr/share/elasticsearch/data
- elasticsearch-logs:/usr/share/elasticsearch/logs
environment:
- discovery.type=single-node
- xpack.security.enabled=false
- xpack.security.http.ssl.enabled=false
- xpack.security.transport.ssl.enabled=false
- ES_JAVA_OPTS=-Xms1g -Xmx1g
healthcheck:
test:
- "CMD"
- "curl"
- "-f"
- "http://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=30s"
interval: 30s
timeout: 10s
retries: 8
ports:
- ${ELASTICSEARCH_PORT:-9200}:9200
exporter:
build:
context: .
dockerfile: Dockerfile.dev
healthcheck:
test:
- "CMD"
- "curl"
- "localhost:9198/healthcheck"
- "-f"
interval: 30s
timeout: 10s
retries: 8
volumes:
- .:/app
restart: unless-stopped
environment:
- LOGSTASH_URL=${LOGSTASH_URL:-http://logstash:9600}
ports:
- ${EXPORTER_PORT:-9198}:9198
volumes:
logstash-data:
prometheus-data:
elasticsearch-data:
elasticsearch-logs: