-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
72 lines (67 loc) · 2.09 KB
/
docker-compose.yml
File metadata and controls
72 lines (67 loc) · 2.09 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
version: '3.8'
services:
web:
build: .
image: codespaces-react-web:latest
ports:
- "3000:80"
restart: unless-stopped
environment:
- NODE_ENV=production
- REACT_APP_API_URL=http://backend:3001
labels:
com.datadoghq.ad.checks: '{"nginx": {"instances": [{"nginx_status_url": "http://%%host%%/nginx_status"}], "logs": [{"source": "nginx", "service": "web"}]}}'
depends_on:
- backend
- image-service
backend:
build:
context: .
dockerfile: Dockerfile.backend
image: codespaces-react-backend:latest
ports:
- "3001:3001"
restart: unless-stopped
environment:
- NODE_ENV=production
env_file:
- .env
labels:
com.datadoghq.ad.checks: '{"process": {"instances": [{"name": "node", "search_string": ["node", "openai.js"]}], "logs": [{"source": "nodejs", "service": "backend"}]}}'
image-service:
build: ./docker/image-service
image: codespaces-react-image-service:latest
ports:
- "5000:5000"
restart: unless-stopped
environment:
- FLASK_ENV=production
labels:
com.datadoghq.ad.checks: '{"process": {"instances": [{"name": "python", "search_string": ["python", "app.py"]}], "logs": [{"source": "python", "service": "image-service"}]}}'
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/health"]
interval: 30s
timeout: 5s
retries: 3
datadog:
image: datadog/agent:latest
environment:
- DD_API_KEY=${DD_API_KEY}
- DD_SITE=datadoghq.com
- DD_DOGSTATSD_NON_LOCAL_TRAFFIC=true
- DD_APM_ENABLED=true
- DD_PROCESS_AGENT_ENABLED=true
- DD_LOGS_ENABLED=true
- DD_CONTAINER_LABELS_AS_TAGS=true
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /proc/:/host/proc/:ro
- /sys/fs/cgroup/:/host/sys/fs/cgroup:ro
ports:
- "8126:8126" # APM
- "8125:8125/udp" # DogStatsD
depends_on:
- web
- backend
# Note: this compose file runs the frontend (nginx) on host port 3000
# and the image-processing service on 5000. Adjust ports as needed.