-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.loadtest.yml
More file actions
59 lines (55 loc) · 1.39 KB
/
docker-compose.loadtest.yml
File metadata and controls
59 lines (55 loc) · 1.39 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
services:
loadtest-app:
build:
context: .
dockerfile: Dockerfile.loadtest
ports:
- "8082:8082"
env_file:
- .env
environment:
SERVER__PORT: ${LOADTEST_SERVER_PORT:-8082}
DATABASE__HOST: loadtest-postgres
REDIS__HOST: loadtest-redis
depends_on:
loadtest-postgres:
condition: service_healthy
loadtest-redis:
condition: service_healthy
restart: unless-stopped
loadtest-postgres:
image: postgres:16-alpine
ports:
- "5433:5432"
environment:
POSTGRES_USER: ${DATABASE__USER:-fairqueue}
POSTGRES_PASSWORD: ${DATABASE__PASSWORD:-fairqueue}
POSTGRES_DB: ${DATABASE__NAME:-fairqueue_loadtest}
volumes:
- loadtest_postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DATABASE__USER:-fairqueue} -d ${DATABASE__NAME:-fairqueue_loadtest}"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
loadtest-redis:
image: redis:7-alpine
ports:
- "6380:6379"
volumes:
- loadtest_redis_data:/data
command: >
redis-server
--appendonly yes
--appendfsync everysec
--save 60 1
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
volumes:
loadtest_postgres_data:
loadtest_redis_data: