-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
114 lines (110 loc) · 2.94 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
version: "3"
networks:
test-this-net:
driver: bridge
volumes:
postgres:
web:
influxdb-storage:
chronograf-storage:
grafana-storage:
services:
web:
image: "testdjango/web:${PYTHON_VERSION}${PYTHON_DEP_VARIATION}"
command: ["./docker/web/docker-${SERVED_BY}-entrypoint.sh"]
volumes:
- ./:/app
ports:
- 8000:8000
networks:
- test-this-net
environment:
- WAIT_HOSTS=postgres:5432
- DATABASE_URL_HOST=postgres
- WITH_APP=${SERVED_BY}
- test_with_slowapi=${test_with_slowapi}
- test_only_slowapi=${test_only_slowapi}
depends_on:
- postgres
postgres:
environment:
- POSTGRES_USER=testdb
- POSTGRES_PASSWORD=password
- POSTGRES_DB=testdb
- pg_shared_buffers=${pg_shared_buffers}
- pg_max_connections=${pg_max_connections}
image: postgres:latest
command: ["postgres", "-c", "shared_buffers=${pg_shared_buffers}", "-c", "max_connections=${pg_max_connections}"]
ports:
- 5432:5432
networks:
- test-this-net
volumes:
- postgres:/var/lib/postgresql/data
load-test:
profiles:
- load-test-run
image: "loadimpact/k6"
# command: "run --http-debug=\"full\" /app/load_tests/k6_test.js"
command: "run /app/load_tests/k6_test.js"
networks:
- test-this-net
volumes:
- ./:/app
environment:
- test_email=${test_email}
- test_user_password=${test_user_password}
- test_review_app_url=${test_review_app_url}
- test_scenario_option=${test_scenario_option}
- test_try_python_async=${test_try_python_async}
- PYTHON_VERSION=${PYTHON_VERSION}
- SERVED_BY=${SERVED_BY}
- PYTHON_DEP_VARIATION=${PYTHON_DEP_VARIATION}
- test_with_slowapi=${test_with_slowapi}
- test_only_slowapi=${test_only_slowapi}
influxdb:
profiles:
- load-test
image: influxdb:latest
networks:
- test-this-net
ports:
- "8086:8086"
volumes:
- influxdb-storage:/var/lib/influxdb
environment:
- INFLUXDB_DB=db0
- INFLUXDB_ADMIN_USER=${INFLUXDB_USERNAME}
- INFLUXDB_ADMIN_PASSWORD=${INFLUXDB_PASSWORD}
chronograf:
profiles:
- load-test
image: chronograf:latest
networks:
- test-this-net
ports:
- "127.0.0.1:8888:8888"
volumes:
- chronograf-storage:/var/lib/chronograf
depends_on:
- influxdb
environment:
- INFLUXDB_URL=http://influxdb:8086
- INFLUXDB_USERNAME=${INFLUXDB_USERNAME}
- INFLUXDB_PASSWORD=${INFLUXDB_PASSWORD}
grafana:
profiles:
- load-test
networks:
- test-this-net
image: grafana/grafana:latest
ports:
- "3000:3000"
volumes:
- grafana-storage:/var/lib/grafana
- ./docker/local/grafana-provisioning/:/etc/grafana/provisioning
depends_on:
- influxdb
environment:
- GF_SECURITY_ADMIN_USER=${GRAFANA_USERNAME}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}