-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
204 lines (202 loc) · 7.28 KB
/
docker-compose.yml
File metadata and controls
204 lines (202 loc) · 7.28 KB
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
services:
dd-agent:
image: gcr.io/datadoghq/agent:${DD_AGENT_VERSION:-latest}
pid: host
environment:
- DD_API_KEY=${DD_API_KEY}
- DD_ENV=${DD_ENV:-production}
- DD_LOGS_ENABLED=true
- DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL=true
- DD_CONTAINER_EXCLUDE=image:agent name:puppeteer
- DD_CLOUD_PROVIDER_METADATA=[]
- DD_HOSTNAME=${DD_HOSTNAME:-production-host}
- DD_DOGSTATSD_NON_LOCAL_TRAFFIC=true
networks:
- storedog-network
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /var/lib/docker/containers:/var/lib/docker/containers:ro
- /proc/:/host/proc/:ro
- /sys/fs/cgroup/:/host/sys/fs/cgroup:ro
- postgres_logs:/var/log/pg_log:ro
frontend:
image: ghcr.io/datadog/storedog/frontend:${STOREDOG_IMAGE_VERSION:-latest}
command: bash -c "wait-for-it backend:4000 -- ${FRONTEND_COMMAND:-npm run prod}"
depends_on:
- worker
- dd-agent
- backend
networks:
- storedog-network
environment:
- DD_AGENT_HOST=dd-agent
- DD_ENV=${DD_ENV:-production}
- DD_SERVICE=store-frontend-api # used for Next.js API routes
- DD_VERSION=${NEXT_PUBLIC_DD_VERSION_FRONTEND:-1.0.0}
- DD_RUNTIME_METRICS_ENABLED=true
- DD_PROFILING_ENABLED=true
- DD_PROFILING_TIMELINE_ENABLED=true
- DD_PROFILING_ALLOCATION_ENABLED=true
- NEXT_PUBLIC_DD_APPLICATION_ID=${NEXT_PUBLIC_DD_APPLICATION_ID:-DD_APPLICATION_ID-not-set}
- NEXT_PUBLIC_DD_CLIENT_TOKEN=${NEXT_PUBLIC_DD_CLIENT_TOKEN:-DD_CLIENT_TOKEN-not-set}
- NEXT_PUBLIC_DD_SITE=${NEXT_PUBLIC_DD_SITE:-datadoghq.com}
- NEXT_PUBLIC_DD_SERVICE_FRONTEND=store-frontend # used for client-side Next.js RUM configuration
- NEXT_PUBLIC_DD_ENV=${DD_ENV:-production}
- NEXT_PUBLIC_DD_VERSION=${NEXT_PUBLIC_DD_VERSION_FRONTEND:-1.0.0}
labels:
com.datadoghq.ad.logs: '[{"source": "nodejs", "auto_multi_line_detection": true }]'
backend:
image: ghcr.io/datadog/storedog/backend:${STOREDOG_IMAGE_VERSION:-latest}
command: wait-for-it postgres:5432 -- bundle exec ddprofrb exec rails s -b 0.0.0.0 -p 4000 --pid /app/tmp/pids/server.pid
depends_on:
- 'postgres'
- 'redis'
- 'dd-agent'
networks:
- storedog-network
environment:
- DD_AGENT_HOST=dd-agent
- DD_ENV=${DD_ENV:-production}
- DD_SERVICE=store-backend
- DD_VERSION=${DD_VERSION_BACKEND:-1.0.0}
- DD_RUNTIME_METRICS_ENABLED=true
- DD_PROFILING_ENABLED=true
- DD_PROFILING_TIMELINE_ENABLED=true
- DD_PROFILING_ALLOCATION_ENABLED=true
labels:
com.datadoghq.ad.logs: '[{"source": "ruby", "auto_multi_line_detection": true }]'
worker:
image: ghcr.io/datadog/storedog/backend:${STOREDOG_IMAGE_VERSION:-latest}
command: wait-for-it postgres:5432 -- bundle exec ddprofrb exec sidekiq -C config/sidekiq.yml
depends_on:
- 'postgres'
- 'redis'
- 'backend'
- 'dd-agent'
networks:
- storedog-network
environment:
- WORKER=true
- DD_AGENT_HOST=dd-agent
- DD_ENV=${DD_ENV:-production}
- DD_SERVICE=store-worker
- DD_VERSION=${DD_VERSION_BACKEND:-1.0.0}
- DD_RUNTIME_METRICS_ENABLED=true
- DD_PROFILING_ENABLED=true
- DD_PROFILING_TIMELINE_ENABLED=true
- DD_PROFILING_ALLOCATION_ENABLED=true
labels:
com.datadoghq.ad.logs: '[{"source": "ruby", "auto_multi_line_detection": true }]'
discounts:
image: ghcr.io/datadog/storedog/discounts:${STOREDOG_IMAGE_VERSION:-latest}
command: wait-for-it postgres:5432 -- ddtrace-run flask run --port=2814 --host=0.0.0.0
depends_on:
- postgres
- dd-agent
environment:
- DD_AGENT_HOST=dd-agent
- DD_ENV=${DD_ENV:-production}
- DD_SERVICE=store-discounts
- DD_VERSION=${DD_VERSION_DISCOUNTS:-1.0.0}
- DD_RUNTIME_METRICS_ENABLED=true
- DD_PROFILING_ENABLED=true
- DD_PROFILING_TIMELINE_ENABLED=true
- DD_PROFILING_ALLOCATION_ENABLED=true
networks:
- storedog-network
labels:
com.datadoghq.ad.logs: '[{"source": "python"}]'
ads:
image: ghcr.io/datadog/storedog/ads-java:${STOREDOG_IMAGE_VERSION:-latest}
depends_on:
- postgres
- dd-agent
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_HOST=postgres
- DD_AGENT_HOST=dd-agent
- DD_ENV=${DD_ENV:-production}
- DD_SERVICE=store-ads
- DD_VERSION=${DD_VERSION_ADS:-1.0.0}
- DD_PROFILING_ENABLED=true
- DD_PROFILING_TIMELINE_ENABLED=true
- DD_PROFILING_ALLOCATION_ENABLED=true
networks:
- storedog-network
labels:
com.datadoghq.ad.logs: '[{"source": "java"}]'
com.datadoghq.tags.service: 'store-ads'
com.datadoghq.tags.version: '${DD_VERSION_ADS:-1.0.0}'
service-proxy:
image: ghcr.io/datadog/storedog/nginx:${STOREDOG_IMAGE_VERSION:-latest}
restart: always
ports:
- '80:80'
networks:
- storedog-network
depends_on:
- frontend
- dd-agent
environment:
- DD_AGENT_HOST=dd-agent
- DD_ENV=${DD_ENV:-production}
- DD_SERVICE=service-proxy
- DD_VERSION=${DD_VERSION_NGINX:-1.28.0}
labels:
com.datadoghq.ad.logs: '[{"source": "nginx"}]'
com.datadoghq.ad.check_names: '["nginx"]'
com.datadoghq.ad.init_configs: '[{}]'
com.datadoghq.ad.instances: '[{"nginx_status_url": "http://%%host%%:81/nginx_status/"}]'
postgres:
image: ghcr.io/datadog/storedog/postgres:${STOREDOG_IMAGE_VERSION:-latest}
restart: always
depends_on:
- dd-agent
volumes:
- postgres_logs:/var/log/pg_log:rw
networks:
- storedog-network
environment:
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
labels:
com.datadoghq.tags.service: 'store-db'
com.datadoghq.tags.version: '${DD_VERSION_POSTGRES:-15.0}'
com.datadoghq.ad.check_names: '["postgres"]'
com.datadoghq.ad.init_configs: '[{}]'
com.datadoghq.ad.instances: '[{"host":"%%host%%", "port":5432, "username":"datadog", "password":"datadog"}]'
com.datadoghq.ad.logs: '[{"source": "postgresql", "service":"store-db", "auto_multi_line_detection": true, "path": "/var/log/pg_log/postgresql*.json", "type": "file"}]'
redis:
image: redis:6.2-alpine
depends_on:
- dd-agent
volumes:
- 'redis:/data'
networks:
- storedog-network
labels:
com.datadoghq.tags.service: 'redis'
com.datadoghq.tags.version: '${DD_VERSION_REDIS:-6.2}'
com.datadoghq.ad.check_names: '["redisdb"]'
com.datadoghq.ad.init_configs: '[{}]'
com.datadoghq.ad.instances: '[{"host":"%%host%%", "port":6379}]'
com.datadoghq.ad.logs: '[{"source": "redis", "service": "redis"}]'
puppeteer:
image: ghcr.io/datadog/storedog/puppeteer:${STOREDOG_IMAGE_VERSION:-latest}
platform: linux/amd64
environment:
- STOREDOG_URL=${STOREDOG_URL:-http://service-proxy:80}
- PUPPETEER_TIMEOUT=${PUPPETEER_TIMEOUT:-30000}
networks:
- storedog-network
depends_on:
- frontend
shm_size: '4gb' # Increase shared memory size
cap_add:
- 'SYS_ADMIN' # Required for Puppeteer to run in Docker
volumes:
redis:
postgres_logs:
networks:
storedog-network: