-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
85 lines (83 loc) · 3.16 KB
/
docker-compose.yaml
File metadata and controls
85 lines (83 loc) · 3.16 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
services:
benchmarkoor:
image: ethpandaops/benchmarkoor:dev
build:
context: .
dockerfile: Dockerfile
args:
VERSION: ${VERSION:-dev}
COMMIT: ${COMMIT:-none}
DATE: ${DATE:-unknown}
# Required for dropping memory caches, ZFS/overlayfs datadir methods, etc.
privileged: true
# Share host PID namespace so nsenter can access /proc/<pid>/ns/net
# for dropping TCP connections before checkpoint-restore.
pid: host
environment:
- BENCHMARKOOR_RUNNER_DROP_CACHES_PATH=/host_drop_caches
- BENCHMARKOOR_RUNNER_CPU_SYSFS_PATH=/host_sys_cpu
- BENCHMARKOOR_RUNNER_DIRECTORIES_TMP_DATADIR=${PWD}/tmp/data
- BENCHMARKOOR_RUNNER_DIRECTORIES_TMP_CACHEDIR=${PWD}/tmp/cache
- BENCHMARKOOR_RUNNER_BENCHMARK_RESULTS_OWNER=${USER_UID}:${USER_GID}
volumes:
# The docker socket is required to interact with docker containers
- /var/run/docker.sock:/var/run/docker.sock:ro
# The podman socket is required when using container_runtime: podman
- /run/podman/podman.sock:/run/podman/podman.sock
# Podman container storage, required for checkpoint-restore
- /var/lib/containers:/var/lib/containers:rshared
# The cgroups path is recommended when on Linux systems to fetch system metrics
- /sys/fs/cgroup:/sys/fs/cgroup:ro
# Required for dropping memory caches between tests (config.yaml#client.config.drop_memory_caches)
- /proc/sys/vm/drop_caches:/host_drop_caches
# Required for CPU frequency control (config.yaml#client.config.resource_limits.cpu_freq)
- /sys/devices/system/cpu:/host_sys_cpu
# Config file
- ./${BENCHMARKOOR_CONFIG:-config.example.docker.yaml}:/app/config.yaml:ro
# Temp directory (For fetching temporary files and node data dirs)
# rshared propagation ensures overlay mounts are visible to sibling containers
- type: bind
source: ${PWD}/tmp
target: ${PWD}/tmp
bind:
propagation: rshared
# For ZFS datadir methods, mount your ZFS data path with rshared propagation:
#- type: bind
# source: /data-zfs-2
# target: /data-zfs-2
# bind:
# propagation: rshared
# Results directory
- ./results:/app/results
working_dir: /app
command: ["run", "--config", "/app/config.yaml"]
network_mode: host
api:
image: ethpandaops/benchmarkoor:dev
build:
context: .
dockerfile: Dockerfile
volumes:
# Config file
- ./${BENCHMARKOOR_CONFIG:-config.example.docker.yaml}:/app/config.yaml:ro
# Data directory for SQLite DB
- ./data:/app/data
working_dir: /app
command: ["api", "--config", "/app/config.yaml"]
ports:
- "${API_PORT:-9090}:9090"
ui:
image: ethpandaops/benchmarkoor-ui:dev
build:
context: .
dockerfile: Dockerfile.ui
args:
APP_VERSION: ${APP_VERSION:-dev}
ports:
- "${UI_PORT:-8080}:80"
volumes:
- ./results:/usr/share/nginx/html/results:ro
# Override runtime config to point UI at the API service
- ./ui/public/config.docker.json:/usr/share/nginx/html/config.json:ro
depends_on:
- benchmarkoor