-
Notifications
You must be signed in to change notification settings - Fork 85
Expand file tree
/
Copy pathcompose_elk.yaml
More file actions
52 lines (49 loc) · 1.34 KB
/
Copy pathcompose_elk.yaml
File metadata and controls
52 lines (49 loc) · 1.34 KB
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
services:
db:
image: postgres:17.6
container_name: library-db
environment:
POSTGRES_DB: library
POSTGRES_USER: test
POSTGRES_PASSWORD: test
ports:
- "5432:5432"
elastic:
image: docker.elastic.co/elasticsearch/elasticsearch:9.1.5
container_name: library-elastic
environment:
- discovery.type=single-node
- xpack.security.enabled=false
- ES_JAVA_OPTS=-Xms1g -Xmx1g
- cluster.name=library-logs
ports:
- "9200:9200"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:9200/_cluster/health || exit 1"]
interval: 10s
timeout: 5s
retries: 30
start_period: 40s
kibana:
image: docker.elastic.co/kibana/kibana:9.1.5
container_name: library-kibana
environment:
- ELASTICSEARCH_HOSTS=http://elastic:9200
ports:
- "5601:5601"
depends_on:
elastic:
condition: service_healthy
otel-collector:
image: otel/opentelemetry-collector-contrib:0.137.0
container_name: library-elk-otel-collector
command: [ "--config=/etc/otelcol/config.yaml" ]
volumes:
- ./otel/otel-collector-config-elk.yaml:/etc/otelcol/config.yaml:ro
- ./logs:/var/log/app
ports:
- "4315:4317" # OTLP gRPC
- "4316:4318" # OTLP HTTP
depends_on:
elastic:
condition: service_healthy