This repository has been archived by the owner on Oct 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
docker-compose.yml
68 lines (65 loc) · 1.81 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
version: "2.1"
services:
apm-server:
image: ${APM_DOCKER_IMAGE:-docker.elastic.co/apm/apm-server}:${STACK_VERSION:-8.0.0-SNAPSHOT}
ports:
- "127.0.0.1:8201:8200"
- "127.0.0.1:6061:6060"
command: >
apm-server -e
-E monitoring.enabled=true
-E apm-server.expvar.enabled=true
-E apm-server.instrumentation.enabled=true
-E output.elasticsearch.hosts=["${ES_URL}"]
-E output.elasticsearch.username=${ES_USER}
-E output.elasticsearch.password=${ES_PASS}
environment:
- ES_URL=${ES_URL}
- ES_USER=${ES_USER}
- ES_PASS=${ES_PASS}
cap_drop:
- ALL
cap_add:
- CHOWN
- DAC_OVERRIDE
- SETGID
- SETUID
logging:
driver: 'json-file'
options:
max-size: '2m'
max-file: '5'
healthcheck:
test: ["CMD", "curl", "--write-out", "'HTTP %{http_code}'", "--silent", "--output", "/dev/null", "http://apm-server:8200/"]
retries: 10
interval: 10s
hey-apm:
build:
context: ./
dockerfile: docker/Dockerfile-bench
working_dir: /app
command: >
/hey-apm -bench -run 5m -rm 1.2 -apm-url http://apm-server:8200 -es-url ${ES_URL} -es-auth "${ES_USER}:${ES_PASS}" -apm-es-url ${ES_URL} -apm-es-auth "${ES_USER}:${ES_PASS}"
environment:
- ES_URL=${ES_URL}
- ES_USER=${ES_USER}
- ES_PASS=${ES_PASS}
volumes:
- ${PWD}:/app
user: ${USER_ID}
mem_limit: 200m
depends_on:
apm-server:
condition: service_healthy
validate-es-url:
condition: service_started
validate-es-url:
image: pstauffer/curl
command: curl --user "${ES_USER}:${ES_PASS}" "${ES_URL}"
environment:
- ES_URL=${ES_URL}
- ES_USER=${ES_USER}
- ES_PASS=${ES_PASS}
volumes:
esdata:
driver: local