Files
mctf/braindance/compose.yml
T
TakuyaYagam1 b60d431b67 fix(braindance): expire retained state promptly
- Keep records for the five-minute flag lifetime plus a one-minute margin.
- Prevent historical records from exhausting global storage.
2026-11-29 15:13:08 +03:00

40 lines
1.1 KiB
YAML
Executable File

services:
braindance:
build: .
restart: unless-stopped
init: true
cpus: "1.0"
mem_limit: 512m
memswap_limit: 512m
pids_limit: 128
stop_grace_period: 45s
ulimits:
nofile: {soft: 1024, hard: 1024}
tmpfs:
- /tmp:size=64m,mode=1777
logging:
driver: json-file
options: {max-size: "10m", max-file: "3"}
env_file: env
environment:
PYTHONUNBUFFERED: "1"
PYTHONDONTWRITEBYTECODE: "1"
RETENTION_SECONDS: ${RETENTION_SECONDS:-360}
FLAG_LIFETIME_SECONDS: ${FLAG_LIFETIME_SECONDS:-300}
CLEANUP_INTERVAL_SECONDS: ${CLEANUP_INTERVAL_SECONDS:-15}
SNAPSHOT_INTERVAL_SECONDS: ${SNAPSHOT_INTERVAL_SECONDS:-5}
MAX_DATA_BYTES: ${BD_MAX_DATA_BYTES:-67108864}
ports:
- "5000:5000"
volumes:
- braindance-data:/data
healthcheck:
test: ["CMD", "python", "-c",
"import urllib.request; urllib.request.urlopen('http://127.0.0.1:5000/health', timeout=2).close()"]
interval: 10s
timeout: 3s
start_period: 10s
retries: 3
volumes:
braindance-data: