-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
69 lines (63 loc) · 1.49 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
version: '3.8'
services:
mysql:
image: mysql:8.4.0
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
ports:
- "3306:3306"
volumes:
- mysql-data:/var/lib/mysql
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- mynetwork
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 5
datadog:
image: datadog/agent:latest
environment:
- DD_API_KEY=4426ed4fa4fa53079e94e7e6c1424ba5
- DD_APM_ENABLED=true
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /proc/:/host/proc/:ro
- /sys/fs/cgroup/:/host/sys/fs/cgroup:ro
networks:
- mynetwork
rock-paper-scissors-service:
build:
context: ./rock-paper-scissors-service
dockerfile: Dockerfile
ports:
- "8080:8080"
depends_on:
mysql:
condition: service_healthy
datadog:
condition: service_started
redis:
condition: service_healthy # Espera até que o Redis esteja saudável
networks:
- mynetwork
redis:
image: redis:latest
container_name: redis-server
ports:
- "6379:6379"
networks:
- mynetwork
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
volumes:
mysql-data:
networks:
mynetwork: