forked from DataDog/dd-trace-rb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
84 lines (84 loc) · 2.49 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
version: '3.4'
services:
app:
build:
context: .
args:
BASE_IMAGE: datadog/dd-apm-demo:rb-2.7
depends_on:
- ddagent
- redis
environment:
- BUNDLE_GEMFILE=/app/Gemfile
- REDIS_URL=redis://redis:6379
- DD_AGENT_HOST=ddagent
- DD_METRIC_AGENT_PORT=8125
- DD_TRACE_AGENT_PORT=8126
- DD_HEALTH_METRICS_ENABLED=true
- DD_SERVICE=acme-rack
- DD_PROFILING_ENABLED=true
# Use these to choose what is run
- DD_DEMO_ENV_PROCESS=puma
- DD_DEMO_ENV_FEATURES=tracing,profiling
# Use this for a local version of ddtrace
- DD_DEMO_ENV_GEM_LOCAL_DDTRACE=/vendor/dd-trace-rb
# Use these for a specific revision of ddtrace
# - DD_DEMO_ENV_GEM_GIT_DDTRACE=https://github.com/DataDog/dd-trace-rb.git
# - DD_DEMO_ENV_GEM_REF_DDTRACE=f233336994315bfa04dac581387a8152bab8b85a
# Enable building the profiling native extension
- DD_DEMO_ENV_BUILD_PROFILING_EXTENSION=true
expose:
- "80"
stdin_open: true
tty: true
volumes:
- .:/app
- ./data/app:/data/app
- bundle:/usr/local/bundle
- ../../images/include:/vendor/dd-demo
- ../../..:/vendor/dd-trace-rb
ddagent:
image: datadog/dd-apm-demo:agent
environment:
- DD_APM_ENABLED=true
- DD_PROCESS_AGENT_ENABLED=false
- DD_BIND_HOST=0.0.0.0
- DD_API_KEY
- LOG_LEVEL=DEBUG
- DD_LOGS_STDOUT=yes
- DD_DOGSTATSD_NON_LOCAL_TRAFFIC=true
expose:
- "8125/udp"
- "8126"
volumes:
- ../../images/agent/agent.yaml:/etc/datadog-agent/datadog.yaml
# For monitoring performance of containers (e.g. CPU, Memory, etc...)
# - type: bind
# source: ../../images/agent/agent.yaml
# target: /etc/datadog-agent/datadog.yaml
# - type: bind
# source: /var/run/docker.sock
# target: /var/run/docker.sock:ro
# - type: bind
# source: /proc/
# target: /host/proc/:ro
# - type: bind
# source: /sys/fs/cgroup/
# target: /host/sys/fs/cgroup:ro
load-tester:
image: datadog/dd-apm-demo:wrk
command: -t10 -c10 -d43200s -s /scripts/scenarios/basic/default.lua http://app/basic/default
depends_on:
- app
environment:
- HEALTH_CHECK_URL=http://app/health
- HEALTH_CHECK_INTERVAL=1
- HEALTH_CHECK_MAX_ATTEMPTS=30
volumes:
- ../../images/wrk/scripts:/scripts
redis:
image: redis:6.2-buster
expose:
- "6379"
volumes:
bundle: