Files
simplexmq/bench/docker-compose.yml
sh 9a0a85a24c feat(bench): self-contained Docker Compose setup
Build benchmark binary inside container via multi-stage
Dockerfile. All-in-one: docker compose run bench.
2026-03-20 14:51:16 +00:00

47 lines
1.0 KiB
YAML

services:
postgres:
image: postgres:17
environment:
POSTGRES_USER: smp
POSTGRES_DB: smp_bench
POSTGRES_HOST_AUTH_METHOD: trust
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U smp -d smp_bench"]
interval: 2s
timeout: 5s
retries: 10
bench:
build:
context: ..
dockerfile: bench/Dockerfile
depends_on:
postgres:
condition: service_healthy
environment:
BENCH_PG: "postgresql://smp@postgres/smp_bench"
BENCH_CLIENTS: "${BENCH_CLIENTS:-5000}"
BENCH_MINUTES: "${BENCH_MINUTES:-5}"
command:
- "--pg"
- "postgresql://smp@postgres/smp_bench"
- "--clients"
- "${BENCH_CLIENTS:-5000}"
- "--minutes"
- "${BENCH_MINUTES:-5}"
- "--timeseries"
- "/results/timeseries.csv"
- "+RTS"
- "-N"
- "-A16m"
- "-T"
- "-RTS"
volumes:
- ./results:/results
volumes:
pgdata: