-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-performance-test.yml
More file actions
125 lines (116 loc) · 2.82 KB
/
docker-compose-performance-test.yml
File metadata and controls
125 lines (116 loc) · 2.82 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
version: '3.8'
services:
app:
env_file:
- .env
environment:
- DB_URL=jdbc:postgresql://host.docker.internal:5432/${DB_NAME}
- REDIS_HOST=host.docker.internal
build: .
container_name: ${CONTAINER_NAME}
ports:
- "8080:8080"
restart: unless-stopped
volumes:
- /var/log/eye-on:/app/logs
deploy:
resources:
limits:
cpus: '2'
memory: 2G
mem_swappiness: 0
extra_hosts:
- "host.docker.internal:host-gateway"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8080/actuator/health" ]
interval: 30s
timeout: 30s
retries: 3
start_period: 5s
networks:
- monitoring
- default
cadvisor:
image: gcr.io/cadvisor/cadvisor
privileged: true
restart: unless-stopped
container_name: cadvisor
ports:
- "8085:8080"
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
- /dev/disk/:/dev/disk:ro
networks:
- monitoring
prometheus:
image: prom/prometheus:v2.43.0
container_name: prometheus
restart: unless-stopped
ports:
- "9090:9090"
volumes:
- ./config/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
- --web.enable-remote-write-receiver
depends_on:
- cadvisor
networks:
- monitoring
grafana:
image: grafana/grafana:9.5.2
container_name: grafana
restart: unless-stopped
ports:
- "4000:3000"
volumes:
- grafana-storage:/var/lib/grafana
environment:
- GF_SECURITY_ADMIN_USER=${GRAFANA_ADMIN_USER}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD}
depends_on:
- prometheus
networks:
- monitoring
k6:
image: grafana/k6:0.47.0
container_name: k6
ports:
- "6565:6565"
command: [ "sleep", "infinity" ]
environment:
- K6_PROMETHEUS_RW_SERVER_URL=http://prometheus:9090/api/v1/write
- K6_OUT=experimental-prometheus-rw
- API_HOST=${API_HOST}
- API_PORT=${API_PORT}
volumes:
- ./src/test/java/com/on/eye/api/performance/scripts:/scripts
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
- prometheus
networks:
- monitoring
node-exporter:
image: prom/node-exporter
container_name: node-exporter
ports:
- "9100:9100"
depends_on:
- prometheus
networks:
- monitoring
networks:
monitoring:
volumes:
postgres-data:
prometheus-data:
grafana-storage: