-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
158 lines (148 loc) · 3.67 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
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
version: '3.8'
services:
dev-db:
image: postgres:13
container_name: dev-db
restart: always
ports:
- 5434:5432
environment:
POSTGRES_USER: psqluser
POSTGRES_PASSWORD: psqlpass
POSTGRES_DB: psqldb
test-db:
image: postgres:13
container_name: test-db
restart: always
ports:
- 5435:5432
environment:
POSTGRES_USER: psqluser
POSTGRES_PASSWORD: psqlpass
POSTGRES_DB: psqldb
nest-api:
build:
context: .
dockerfile: Dockerfile
image: nest-api
container_name: nest-api
depends_on:
- test-db
ports:
- 8080:8080
expose:
- 8080
environment:
- DATABASE_URL=postgresql://psqluser:psqlpass@test-db:5432/psqldb
- PORT=8080
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/api"]
interval: 40s
timeout: 20s
retries: 5
influxdb:
image: influxdb:1.8
ports:
- 8086:8086
environment:
- INFLUXDB_DB=k6
grafana:
image: grafana/grafana:latest
depends_on:
influxdb:
condition: service_started
ports:
- 3000:3000
environment:
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_BASIC_ENABLED=false
volumes:
- ./resources/grafana/k6-load-testing-results_rev3.json:/var/lib/grafana/dashboards/k6-load-testing-results_rev3.json
- ./resources/grafana/grafana-dashboard.yaml:/etc/grafana/provisioning/dashboards/dashboard.yaml
- ./resources/grafana/grafana-datasource.yaml:/etc/grafana/provisioning/datasources/datasource.yaml
k6-auth:
image: grafana/k6:latest
depends_on:
influxdb:
condition: service_started
grafana:
condition: service_started
nest-api:
condition: service_healthy
ports:
- 6564:6564
environment:
- K6_OUT=influxdb=http://influxdb:8086/k6
- BASE_URL=http://nest-api:8080
volumes:
- ./dist/test:/test
command: run /test/load/auth.load.js
k6-review:
image: grafana/k6:latest
depends_on:
influxdb:
condition: service_started
grafana:
condition: service_started
nest-api:
condition: service_healthy
ports:
- 6565:6565
environment:
- K6_OUT=influxdb=http://influxdb:8086/k6
- BASE_URL=http://nest-api:8080
volumes:
- ./dist/test:/test
command: run /test/load/review.load.js
k6-room:
image: grafana/k6:latest
depends_on:
influxdb:
condition: service_started
grafana:
condition: service_started
nest-api:
condition: service_healthy
ports:
- 6566:6566
environment:
- K6_OUT=influxdb=http://influxdb:8086/k6
- BASE_URL=http://nest-api:8080
volumes:
- ./dist/test:/test
command: run /test/load/room.load.js
k6-shop:
image: grafana/k6:latest
depends_on:
influxdb:
condition: service_started
grafana:
condition: service_started
nest-api:
condition: service_healthy
ports:
- 6567:6567
environment:
- K6_OUT=influxdb=http://influxdb:8086/k6
- BASE_URL=http://nest-api:8080
volumes:
- ./dist/test:/test
command: run /test/load/shop.load.js
k6-user:
image: grafana/k6:latest
depends_on:
influxdb:
condition: service_started
grafana:
condition: service_started
nest-api:
condition: service_healthy
ports:
- 6568:6568
environment:
- K6_OUT=influxdb=http://influxdb:8086/k6
- BASE_URL=http://nest-api:8080
volumes:
- ./dist/test:/test
command: run /test/load/user.load.js