-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
66 lines (58 loc) · 1.63 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
######## DISTRIBUTED LOAD TESTING #########
version: '3.8'
services:
####### Locust Service #########
locust:
image: locustio/locust
ports:
- "8089:8089"
volumes:
- ./load_tests.py:/mnt/locust/load_tests.py
command: -f /mnt/locust/load_tests.py --master
####### Worker ########
worker:
image: locustio/locust
volumes:
- ./load_tests.py:/mnt/locust/load_tests.py
command: -f /mnt/locust/load_tests.py --worker --master-host locust
deploy:
replicas: 1 #### Add the number of Workers
######## Locust Exporter #########
locust-metrics-exporter:
image: containersol/locust_exporter
ports:
- "9646:9646"
environment:
- LOCUST_EXPORTER_URI=http://locust:8089
depends_on:
- locust
####### Prometheus Server ########
prometheus:
image: prom/prometheus:latest
container_name: prometheus
ports:
- 9090:9090
command:
- --config.file=/etc/prometheus/prometheus.yml
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
network_mode: bridge
######## Grafana Server #########
grafana:
image: grafana/grafana
container_name: grafana
ports:
- 3000:3000
volumes:
- grafana_data:/var/lib/grafana
- ./grafana/provisioning:/etc/grafana/provisioning
environment:
- GF_SECURITY_ADMIN_USER=${ADMIN_USER} #### Export the user
- GF_SECURITY_ADMIN_PASSWORD=${ADMIN_PASSWORD} #### Export the Password
- GF_USERS_ALLOW_SIGN_UP=false
depends_on:
- prometheus
restart: unless-stopped
network_mode: bridge
volumes:
grafana_data: