-
Notifications
You must be signed in to change notification settings - Fork 4.9k
/
Copy pathdocker-compose.yml
57 lines (54 loc) · 1.94 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
version: '2.3'
services:
beat:
build: ${PWD}/.
depends_on:
- proxy_dep
environment:
- ES_BEATS=/go/src/github.com/elastic/beats
- BEAT_STRICT_PERMS=false
- ES_HOST=elasticsearch
- ES_PORT=9200
working_dir: /go/src/github.com/elastic/beats/x-pack/libbeat
volumes:
- ${PWD}/../..:/go/src/github.com/elastic/beats/
# We launch docker containers to test docker autodiscover:
- /var/run/docker.sock:/var/run/docker.sock
command: make
# This is a proxy used to block beats until all services are healthy.
# See: https://github.com/docker/compose/issues/4369
proxy_dep:
image: busybox
depends_on:
elasticsearch: { condition: service_healthy }
kibana: { condition: service_healthy }
elasticsearch:
extends:
file: ${ES_BEATS}/testing/environments/${TESTING_ENVIRONMENT}.yml
service: elasticsearch
healthcheck:
test: ["CMD-SHELL", "curl -u kibana_system_user:testing -f http://localhost:9200/_cat/health?h=status | grep -q green"]
retries: 1200
interval: 5s
start_period: 60s
environment:
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- "network.host="
- "transport.host=127.0.0.1"
- "http.host=0.0.0.0"
- "xpack.security.enabled=true"
- "xpack.license.self_generated.type=trial"
- "xpack.security.authc.realms.file.file1.order=0"
command: bash -c "bin/elasticsearch-users useradd myelastic -r superuser -p changeme | /usr/local/bin/docker-entrypoint.sh eswrapper"
kibana:
depends_on:
- elasticsearch
extends:
file: ${ES_BEATS}/testing/environments/${TESTING_ENVIRONMENT}.yml
service: kibana
healthcheck:
test: ["CMD-SHELL", "curl -s -u kibana_system_user:testing -f http://localhost:5601/api/status?v8format=true | grep -q '\"overall\":{\"level\":\"available\"'"]
retries: 1200
interval: 5s
start_period: 60s
command: /usr/local/bin/kibana-docker