-
Notifications
You must be signed in to change notification settings - Fork 200
/
Copy pathdocker-compose.yml
35 lines (35 loc) · 1.27 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
version: "4"
services:
web:
build: web
command: ddtrace-run python app.py
ports:
- "5000:5000"
volumes:
- ./web:/code # modified here to take into account the new app path
links:
- redis
environment:
- DATADOG_HOST=datadog # used by the web app to initialize the Datadog library
- DD_AGENT_HOST=dd-agent # points to dd-agent to send traces
redis:
image: redis
# agent section
datadog:
container_name: dd-agent
build: datadog
links:
- redis # ensures that redis is a host that the container can find
- web # ensures that the web app can send metrics
environment:
- DD_API_KEY=__your_datadog_api_key_here__
- DD_DOGSTATSD_NON_LOCAL_TRAFFIC=true # enables agent to receive custom metrics from other containers
- DD_APM_ENABLED=true # enables tracing
- DD_APM_NON_LOCAL_TRAFFIC=true # enables agent to receive traces from other containers
- DD_AGENT_HOST=dd-agent # allows web container to forward traces to agent
- DD_SITE=datadoghq.com # determines datadog instance to send data to (e.g change to datadoghq.eu for EU1)
- DATADOG_HOST=datadog
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /proc/:/host/proc/:ro
- /sys/fs/cgroup:/host/sys/fs/cgroup:ro