-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
74 lines (66 loc) · 2.14 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
version: '2.1'
services:
# Elasticsearch container: 1-node cluster at http://elasticsearch:9200
elasticsearch:
container_name: elasticsearch
hostname: elasticsearch
image: "docker.elastic.co/elasticsearch/elasticsearch:${ELK_VERSION}"
volumes:
- 'es_data:/usr/share/elasticsearch/data'
- ./elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro
ports:
- "9200:9200"
- "9300:9300"
environment:
- http.host=0.0.0.0
- transport.host=127.0.0.1
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms${ES_JVM_HEAP} -Xmx${ES_JVM_HEAP}"
- ELASTIC_PASSWORD=${ES_PASSWORD}
mem_limit: ${ES_MEM_LIMIT}
ulimits:
memlock:
soft: -1
hard: -1
healthcheck:
test: ["CMD", "curl","-s" ,"-f", "-u", "elastic:${ES_PASSWORD}", "http://localhost:9200/_cat/health"]
networks:
- elk
# Filebeat container
filebeat:
container_name: filebeat
hostname: filebeat
image: "docker.elastic.co/beats/filebeat:${ELK_VERSION}"
volumes:
# Mount filebeat configuration
- ./filebeat/config/filebeat.yml:/usr/share/filebeat/filebeat.yml
# Mount log directory into container /tmp/log
- ./test/:/var/log/
networks:
- elk
restart: on-failure
depends_on:
elasticsearch: { condition: service_healthy }
# Kibana container
kibana:
container_name: kibana
hostname: kibana
image: "docker.elastic.co/kibana/kibana:${ELK_VERSION}"
volumes:
- ./kibana/config/kibana.yml:/usr/share/kibana/config/kibana.yml:ro
ports:
# Redirigido el puerto de kibana para acceder desde el navegador con https://localhost:80 siendo localhost la ip dada por Google Cloud Platform
- "80:5601"
networks:
- elk
depends_on:
elasticsearch: { condition: service_healthy }
restart: on-failure
healthcheck:
test: ["CMD", "curl", "-s", "-f", "-u", "elastic:${ES_PASSWORD}", "http://localhost:5601/api/status"]
retries: 6
networks:
elk:
volumes:
es_data:
driver: local