-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
41 lines (37 loc) · 1.03 KB
/
docker-compose.yml
File metadata and controls
41 lines (37 loc) · 1.03 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
version: '3.8'
services:
# Test API endpoint (using httpbin for testing)
test-api:
image: kennethreitz/httpbin
ports:
- "8080:80"
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:80/status/200')"]
interval: 5s
timeout: 3s
retries: 3
# Rust LoadTest tool
loadtest:
build: .
depends_on:
test-api:
condition: service_healthy
volumes:
- ./examples/configs:/app/configs
- ./examples/data:/app/data
- ./results:/app/results
environment:
- TARGET_URL=http://test-api:80
# Override to run a specific test
command: ["rust-loadtest", "--config", "/app/configs/basic-api-test.yaml"]
# Uncomment to keep container running for manual testing
# command: ["tail", "-f", "/dev/null"]
# Simple web server for testing (alternative to httpbin)
simple-api:
image: nginx:alpine
ports:
- "8081:80"
volumes:
- ./test-api:/usr/share/nginx/html:ro
volumes:
results: