-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
37 lines (36 loc) · 1.05 KB
/
docker-compose.yml
File metadata and controls
37 lines (36 loc) · 1.05 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
services:
db:
image: postgres:16
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: benchmark
command:
- "postgres"
- "-c"
- "shared_preload_libraries=pg_stat_statements"
- "-c"
- "pg_stat_statements.track=all"
# fsync=off gives pipeline's sequential w/30 statements ~1.5ms/iteration, while
# leaving it on doubles it to 3.5ms, both going through toxiproxy but w/0ms latency
# Granted, we "want latency" for our tests, but deterministic latency.
- "-c"
- fsync=off
volumes:
- ./sql/init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
toxiproxy:
image: ghcr.io/shopify/toxiproxy:2.12.0
depends_on:
db:
condition: service_healthy
ports:
- "5432:5432"
- "8474:8474"
volumes:
- ./toxiproxy.json:/config/toxiproxy.json
command: "-host=0.0.0.0 -config=/config/toxiproxy.json"