-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
58 lines (45 loc) · 1.41 KB
/
docker-compose.yml
File metadata and controls
58 lines (45 loc) · 1.41 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
version: '3.8'
services:
benchlabd:
build: .
image: benchlab/benchlab-service:latest
container_name: benchlabd
restart: unless-stopped
# Device passthrough - allows container to access USB devices
devices:
- /dev/ttyACM0:/dev/ttyACM0 # Adjust device path as needed
# Alternative: privileged mode (less secure, but works with dynamic device paths)
# privileged: true
ports:
- "8080:8080"
environment:
# Bind to all interfaces in container (reverse proxy should handle external access)
- BENCHLAB_BIND_ADDRESS=http://0.0.0.0:8080
# Set API key for authentication (CHANGE THIS!)
- BENCHLAB_API_KEY=${BENCHLAB_API_KEY:-change-me-in-production}
# Timeouts
- BENCHLAB_DISCOVERY_TIMEOUT_MS=600
- BENCHLAB_COMMAND_TIMEOUT_MS=500
# .NET runtime settings
- DOTNET_RUNNING_IN_CONTAINER=true
- DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true
# Volume mounts for device access
volumes:
- /dev:/dev:ro # Read-only access to /dev for discovery
- /run/udev:/run/udev:ro # udev info
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 3s
retries: 3
start_period: 10s
networks:
- benchlab
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
benchlab:
driver: bridge