forked from DataDog/dd-trace-rb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
107 lines (107 loc) · 3.29 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
version: '3.4'
services:
app:
build:
context: .
args:
BASE_IMAGE: datadog/dd-apm-demo:rb-2.7
depends_on:
- ddagent
- mysql
- redis
environment:
- BUNDLE_GEMFILE=/app/Gemfile
- DATABASE_URL=mysql2://mysql:mysql@mysql:3306
- DATABASE_ROOT_USER=root
- DATABASE_ROOT_PASSWORD=root
- DD_AGENT_HOST=ddagent
- DD_METRIC_AGENT_PORT=8125
- DD_TRACE_AGENT_PORT=8126
- DD_HEALTH_METRICS_ENABLED=true
- DD_SERVICE=acme-rails-six
- DD_PROFILING_ENABLED=true
- RAILS_ENV=production
- RAILS_LOG_TO_STDOUT=true
- REDIS_URL=redis://redis:6379
- SECRET_KEY_BASE=5ced2602472cdf650e2cfa5be40c7d0dffd4e1da1483e21fa9c776e338b363c8bf75144bc6e6c5177a0d7a208a899552f98b3f82d4ea74cf5f9b9d3accbb1537
# Use these to choose what is run
- DD_DEMO_ENV_PROCESS=puma
- DD_DEMO_ENV_FEATURES=tracing,profiling,runtime_metrics
# 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
- logs:/app/log
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
- ./config/agent_app_conf.yaml:/etc/datadog-agent/conf.d/rails-six.d/conf.yaml
- logs:/var/log/rails-six
# For monitoring performance of containers (e.g. CPU, Memory, etc...)
# - type: bind
# source: ../../config/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
mysql:
image: mysql:8.0
command: --default-authentication-plugin=mysql_native_password
environment:
- MYSQL_DATABASE=acme_production
- MYSQL_ROOT_PASSWORD=root
- MYSQL_ROOT_HOST=%
- MYSQL_PASSWORD=mysql
- MYSQL_USER=mysql
expose:
- "3306"
redis:
image: redis:3.2
expose:
- "6379"
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=60
volumes:
- ./data/wrk:/data
- ../../images/wrk/scripts:/scripts
volumes:
bundle:
logs: