forked from l0k0ms/log-workshop-2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
113 lines (105 loc) · 2.41 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
108
109
110
111
112
113
version: '3'
services:
agent:
image: "datadog/agent:latest"
container_name: "datadog-agent"
environment:
- DD_API_KEY
- DD_APM_ENABLED=true
- DD_HOSTNAME=datadog-workshop
# Add DD_APM_ANALYZED_SPANS to the Agent container environment.
# Compatible with version 12.6.5250 or above.
- DD_APM_ANALYZED_SPANS=users-api|express.request=1,sensors-api|flask.request=1,pumps-service|flask.request=1,iot-frontend|flask.request=1
- DD_TAGS='env:workshop'
- DD_PROCESS_AGENT_ENABLED=true
- DD_AC_EXCLUDE='image:agent'
ports:
- "8126:8126"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /proc/:/host/proc/:ro
- /sys/fs/cgroup/:/host/sys/fs/cgroup:ro
- /etc/passwd:/etc/passwd:ro
frontend:
container_name: "frontend"
environment:
- FLASK_APP=api.py
- FLASK_DEBUG=1
build: .
command: flask run --port=5000 --host=0.0.0.0
ports:
- "5000:5000"
volumes:
- "./frontend:/app"
depends_on:
- db
noder:
container_name: "noder"
build: ./node-api
command: nodemon server.js
ports:
- "5004:5004"
volumes:
- "./node-api:/app"
- /app/node_modules
depends_on:
- frontend
- redis
environment:
- DD_ENV=workshop
pumps:
container_name: "pumps"
environment:
- FLASK_APP=thing.py
- FLASK_DEBUG=1
- POSTGRES_PASSWORD
- POSTGRES_USER
build: ./iot-devices
command: flask run --port=5001 --host=0.0.0.0
ports:
- "5001:5001"
volumes:
- "./iot-devices:/app"
depends_on:
- frontend
- db
redis:
container_name: "redis"
image: redis:latest
depends_on:
- agent
sensors:
container_name: "sensors"
environment:
- FLASK_APP=sensors.py
- FLASK_DEBUG=1
- POSTGRES_PASSWORD
- POSTGRES_USER
build: ./sensors
command: flask run --port=5002 --host=0.0.0.0
ports:
- "5002:5002"
volumes:
- "./sensors:/app"
depends_on:
- frontend
- db
db:
container_name: "postgres"
image: postgres:11-alpine
restart: always
environment:
- POSTGRES_PASSWORD
- POSTGRES_USER
ports:
- 5432:5432
depends_on:
- agent
adminer:
container_name: "adminer"
image: adminer
restart: always
ports:
- 8080:8080
depends_on:
- agent