-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
96 lines (90 loc) · 2.15 KB
/
docker-compose.yml
File metadata and controls
96 lines (90 loc) · 2.15 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
services:
store_manager:
build: .
volumes:
- .:/app
ports:
- "5000:5000"
environment:
- PYTHONUNBUFFERED=1
networks:
- labo04-network
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
locust:
image: locustio/locust
ports:
- "8089:8089"
volumes:
- ./locustfiles:/mnt/locust
command: -f /mnt/locust/locustfile.py --host=http://store_manager:5000
depends_on:
- store_manager
networks:
- labo04-network
prometheus:
image: prom/prometheus:latest
container_name: prometheus
ports:
- "9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--web.enable-lifecycle'
networks:
- labo04-network
depends_on:
- store_manager
mysql:
image: mysql:8.4.7
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
networks:
- labo04-network
ports:
- "3306:3306"
volumes:
- mysql_data:/var/lib/mysql
- ./db-init:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -h localhost -u root -proot"]
interval: 1m
timeout: 10s
retries: 5
start_period: 10s
redis:
image: redis:7
restart: unless-stopped
networks:
- labo04-network
ports:
- "6379:6379"
volumes:
- ./generators/redis_mock_data:/commands
- ./redis_entrypoint.sh:/redis_entrypoint.sh
entrypoint: /bin/bash /redis_entrypoint.sh
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 1m
timeout: 10s
retries: 5
start_period: 10s
networks:
labo04-network:
driver: bridge
external: true
volumes:
mysql_data:
prometheus_data: