forked from kernelci/dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.k6.yml
More file actions
92 lines (87 loc) · 2.32 KB
/
docker-compose.k6.yml
File metadata and controls
92 lines (87 loc) · 2.32 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
volumes:
k6-db-data:
test-backend-data:
networks:
public:
private:
services:
k6-db:
image: postgres:17
container_name: k6-db
environment:
POSTGRES_DB: dashboard
POSTGRES_USER: admin
POSTGRES_PASSWORD: admin
volumes:
- k6-db-data:/var/lib/postgresql/data
- ./k6/data:/docker-entrypoint-initdb.d:ro
networks:
- private
healthcheck:
test: ["CMD-SHELL", "pg_isready -U admin -d dashboard"]
interval: 5s
timeout: 5s
retries: 5
ports:
- "5436:5432"
redis:
image: redis:8.0-M04-alpine
restart: always
networks:
- private
ports:
- "6380:6379"
test-backend:
build:
context: ./backend
volumes:
- test-backend-data:/volume_data
networks:
- private
ports:
- 8002:8000
depends_on:
- redis
- k6-db
healthcheck:
test: ["CMD", "curl", "-f", "http://test-backend:8000/api/schema/swagger-ui/"]
interval: 60s
timeout: 5s
retries: 5
start_period: 15s
environment:
DB_NAME: dashboard
DB_USER: admin
DB_PASSWORD: admin
DB_HOST: k6-db
DB_PORT: 5432
DEBUG: True
DEBUG_SQL_QUERY: False
REDIS_HOST: redis
CACHE_TIMEOUT: 60
CORS_ALLOW_ALL_ORIGINS: True
ALLOWED_HOSTS: '["localhost", "test-backend"]'
SKIP_CRONJOBS: True
command:
- poetry
- run
- gunicorn
- kernelCI.wsgi:application
- --workers=5
- --forwarded-allow-ips=*
- --bind=0.0.0.0:8000
- --timeout=250
entrypoint: "./utils/docker/backend_entrypoint.sh"
k6:
build:
context: ./k6
dockerfile: Dockerfile
volumes:
- ./k6/results:/results
networks:
- private
depends_on:
test-backend:
condition: service_healthy
# Modify to run specific tests or comment to run all tests:
# command: ["hardwareDetails"]